ExDatabase Library OpenSource

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

ExDatabase Library OpenSource

Post by Rings »

Well, here it is.
An Addon Library for the Database Lib, designed for Windows.
Most of the ExDatabase library are released as source before(thx to ABBKlaus and myself;) ), so i have bundled and rewritten the sources to a fine small Library for easy use.
The License of the Library is OpenSource so that if any problems with new versions encounter, you can recompile the lib yourself.

Big thx goes to fanglez who wrote a nice example and even more a nice helpfile.

have fun, S.Rings


Download here
Updated
Last edited by Rings on Fri Mar 04, 2005 2:03 pm, edited 1 time in total.
SPAMINATOR NR.1
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Thanks !
All examples are for Access .mdb files. Is it possible to use this library to access directly to an Oracle database on a distant server (I do it through ODBC, but I have to setup the ODBC connection with the archaic ODBC control panel before)?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Looks good :)
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

Post by NoahPhense »

Nifty.. I'll get a chance to play with it tonight..
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

If you use the
CreateEmptyMDB("test.mdb")
command it will add about 60k to your program, is the included file not better packed then unpacked if needed using the unpack commands?

Otherwise, great new lib! :D

-Anthony
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post by Rings »

DoubleDutch wrote:If you use the
CreateEmptyMDB("test.mdb")
command it will add about 60k to your program, is the included file not better packed then unpacked if needed using the unpack commands?

Otherwise, great new lib! :D

-Anthony
yes, i had think about that.
SPAMINATOR NR.1
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

i hope fred doesn´t change the way he stores the DB Handle :twisted:
User avatar
blueb
Addict
Addict
Posts: 1111
Joined: Sat Apr 26, 2003 2:15 pm
Location: Cuernavaca, Mexico

Post by blueb »

I hope that (if Rings and ABBKlaus agree) Fred will include these functions in the next version. They add a lot of usability to PB's database functions., especially the ones that return tablenames.

Thanks fellas. 8)

Best Regrards,
--blueb
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post by Rings »

ABBKlaus wrote:i hope fred doesn´t change the way he stores the DB Handle :twisted:
not a big deal, we can use directly complete the Api .
Blueb wrote:I hope that (if Rings and ABBKlaus agree) Fred will include these functions in the next version. They add a lot of usability to PB's database functions., especially the ones that return tablenames.
the problem seems the portability for linux/MacOs .
SPAMINATOR NR.1
User avatar
blueb
Addict
Addict
Posts: 1111
Joined: Sat Apr 26, 2003 2:15 pm
Location: Cuernavaca, Mexico

Post by blueb »

Thanks Rings, 8)

I forgot about the other systems.

I did make a sample program that uses your ExDatabase lib. Since it was made with the PBDev Visual Developer, I placed it on their web page at: http://www.hellobasic.com/cgi-bin/forum ... 66;start=0

If you have the demo (or full) version of PBDev... simply grab the code, save to your clipboard, open PBDev and paste it directly into a new project.

Thanks again,
--blueb
DLM
New User
New User
Posts: 4
Joined: Fri Apr 01, 2005 5:35 pm

Post by DLM »

I just registered PB and have only been looking at it for a couple of days, so please forgive my ignorance.

I just downloaded ExDatabase and looked at the code. I am curious, why does everyone seem to connect to a *.mdb through a DSN? Since PB can utilize the API why not use a DSNless connection? Also, the code seems to use use the empty.mdb to create a new database!? New *.mdb databases can be created with SQLConfigDataSource, so why not use that?

I don't mean to sound critical, I'm just curious.
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

That's because PB does not connect directly to the database, instead it connects to an ODBC layer (which is a standard convention to make calls to databases), and it's the ODBC layer that connects to the database.

In windows you must create a DNS that points to the desired database with a specific driver (access, sql, csv, etc...)

This happens for you to have databases also in Linux and MacOs...

I just whish Fred added sqlite has an internal database format, but kept the existing commands also, just in case it's needed for other projects...

Come to think of it... Most other connections are made directly, via DLL or TCP... oh well :roll:

If you're looking for a quick database for small / medium projects i sugest the use of the sqlite, which works under for windows and linux... (i've already seen a port for Mac somewere..)
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post by Rings »

DLM wrote:I just registered PB and have only been looking at it for a couple of days, so please forgive my ignorance.

I just downloaded ExDatabase and looked at the code. I am curious, why does everyone seem to connect to a *.mdb through a DSN? Since PB can utilize the API why not use a DSNless connection? Also, the code seems to use use the empty.mdb to create a new database!? New *.mdb databases can be created with SQLConfigDataSource, so why not use that?

I don't mean to sound critical, I'm just curious.
i have been experiemented with directyl create a empty mdb file via
odbc, but the generated files are not compatible to the one you
can create with access directly. VB mentioned that the files are corrupted . Seems like a bug in the odbc-layer for access.
So this version i included works 100%(and i do not care about the xtra stuff in it ).
SPAMINATOR NR.1
DLM
New User
New User
Posts: 4
Joined: Fri Apr 01, 2005 5:35 pm

Post by DLM »

You can create any Access version you need with SQLConfigDataSource and the correct version keyword.

CREATE_DB creates a version to match the MDAC components installed on the computer. This does not always match the version of Access being used.
CREATE_DBV2 for Access 2.0
CREATE_DBV3 for Access 95 and 97
CREATE_DBV4 for Access 2000

More info at
http://support.microsoft.com/kb/126606/EN-US/
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post by Rings »

DLM wrote:You can create any Access version you need with SQLConfigDataSource and the correct version keyword.

CREATE_DB creates a version to match the MDAC components installed on the computer. This does not always match the version of Access being used.
CREATE_DBV2 for Access 2.0
CREATE_DBV3 for Access 95 and 97
CREATE_DBV4 for Access 2000

More info at
http://support.microsoft.com/kb/126606/EN-US/
many thanks, that solved a lot now :)
'CREATE_DB' alone makes the corrupt mdb !
i will update the lib soon and elimate the big
include file now.
SPAMINATOR NR.1
Post Reply