native database support wanted

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by dige.

Hi,
it would be very helpfully if purebasic had a direct integrated database support.
Perhaps dBase for instance...

Would it be possible? Or does anybody knows a free dll?

Regards

dige
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by ebs.

dige,

I recently discovered SQLite (http://www.hwaci.com/sw/sqlite/). From the web page introduction:

--------------------------------------------------------------------
SQLite is a C library that implements an embeddable SQL database engine. Programs that link with the SQLite library can have SQL database access without running a separate RDBMS process. The distribution comes with a standalone command-line access program (sqlite) that can be used to administer an SQLite database and which serves as an example of how to use the SQLite library.

SQLite is not a client library used to connect to a big database server. SQLite is the server. The SQLite library reads and writes directly to and from the database files on disk.
--------------------------------------------------------------------

I think it looks pretty amazing for a DLL which is less than 200KB, and free! The hard part, of course, is figuring out how to use it with PureBasic.

Eric
Originally posted by dige

Hi,
it would be very helpfully if purebasic had a direct integrated database support.
Perhaps dBase for instance...

Would it be possible? Or does anybody knows a free dll?

Regards

dige
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by ebs.

Fred,

SQLite's author sys that:
"Sources are in the public domain. Use for any purpose."

Would you consider making SQLite a PureBasic library? I think it would be great to have *built-in*, *portable* SQL database support without the need for any ODBC drivers, external DLLs, etc.

In the mean time :), I am going to see if I can write PB wrappers for the main SQLite functions.

Regards,
Eric
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Manolo.
Originally posted by ebs

Fred,

SQLite's author sys that:
"Sources are in the public domain. Use for any purpose."

Regards,
Eric
Very interesant database. Is fast. I liked.

Manolo
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Manolo.

Hi Fred,

>SQLite's author sys that:
>"Sources are in the public domain. Use for any purpose."

In this weekend I was work with this source code. Is very easy the implementation to PureBasic Libs and I think tha this is the definitive solution for native database into PureBasic.

Wat it's you opinion??

Regards,

Manolo
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

Why not, but that's not my priority for now. EBS has provided a fast and easy access to this DBM, it should be enough :). If someone want to make a real lib out of it, no problem.

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by dige.
Originally posted by ebs

I recently discovered SQLite (http://www.hwaci.com/sw/sqlite/). From the web page introduction:

--------------------------------------------------------------------
SQLite is a C library that implements an embeddable SQL database engine...
Hi Eric,
thank you very much!! SQLite is great ...

But I'm a new purebasic-user, so I hope i can easy use it with purebasic too. If you had some helpfull pb-library or code snippets for me, that would be very nice.

Yours sincerely

dige
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by blueb.

I just downloaded and played around with SQLite and I have to agree with Manolo. PureBasic libs would be a great addition to the language. As you know, 80% of all computer use includes databases of some sort.

Adding this option to PB can only add to it's popularity.

Regards,
--blueb

ebs... continue working on a function wrapper. It's much appreciated.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by webba.

Hi ebs,

Fred says you have put together a fast and easy access to SQLite. Is that so? I tried to do this a coupla weeks ago but failed. I'm new to PB and I couldn't get the DLL calls to work. I could open the the DLL and also use IsFunction sucessfully, but the callback stuff and the 'opaque data structure' confused the hell out of me. I'd be REALLY happy if you came up with something.

I agree with the other posts here. A good sql database thats already public domain and works without any silly ODBC stuff would be a real plus for PB. I know the DLL only supports single user stuff but heck, for most desktop apps that's fine.

I'm part way through implementing my own VERY simple DBM at the moment using sorted linked lists - but i'd drop it in a second if someone got SQLite working with PB.

Good luck and let us know!

Kind Regards!
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by ebs.

webba and dige,

Look in the "Tips and Tricks" forum. I posted my code a few days ago. Soon I will be sending a new version which supports a few more of the SQLite functions.

Eric
Originally posted by webba

Hi ebs,

Fred says you have put together a fast and easy access to SQLite. Is that so? I tried to do this a coupla weeks ago but failed. I'm new to PB and I couldn't get the DLL calls to work. I could open the the DLL and also use IsFunction sucessfully, but the callback stuff and the 'opaque data structure' confused the hell out of me. I'd be REALLY happy if you came up with something.

I agree with the other posts here. A good sql database thats already public domain and works without any silly ODBC stuff would be a real plus for PB. I know the DLL only supports single user stuff but heck, for most desktop apps that's fine.

I'm part way through implementing my own VERY simple DBM at the moment using sorted linked lists - but i'd drop it in a second if someone got SQLite working with PB.

Good luck and let us know!

Kind Regards!
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Num3.


Hi all,

I believe native suport is important, even more if it's in SQL, because it can be used in Windows and Linux and maybe amiga too.

:)

--
Kind Regards

Rui Carvalho

Current PB Projects:
[Construdata 2003 - 30%]
[Step by Step - 50%]
Post Reply