SQLite Wrapper Functions

Share your advanced PureBasic knowledge/code with the community.
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.

@ebs - How's the SQLite wrapper coming along.
What I see above is terrific so far :)

@El_Choni - What?? You've designed a lib file
for SQLite? :)

Any more information on SQLite would sure be
appreciated by those of us who love database
programming.


Regards,
blueb
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.

El Choni,

You sent me a library? Great! :)

Unfortunately, I didn't receive it. :cry:

Can you please try again?

Eric


Originally posted by El_Choni

@ebs: did you take a look at the lib I sent you?

El_Choni
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.

blueb,

Thanks for the compliment.

What I posted is pretty much it! Is there something missing that you think is necessary? I'm waiting to see what El Choni's library looks like - that may be better than using my code. :)

As far as more information, have you been to the SQLite website (http://www.hwaci.com/sw/sqlite/)?

Regards,
Eric
Originally posted by blueb

@ebs - How's the SQLite wrapper coming along.
What I see above is terrific so far :)

@El_Choni - What?? You've designed a lib file
for SQLite? :)

Any more information on SQLite would sure be
appreciated by those of us who love database
programming.


Regards,
blueb
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 El_Choni.

@ebs: yes, I sent you a message with the forum's e-mail poster with this link:

http://www.terra.es/personal5/temporald/SQLite_1.0.zip

I'd like you to check it and tell me what you think of the little changes it has from the functions you posted, and your suggestions, etc.

@blueb: I only converted ebs's wrapping functions to a purelib, nothing new. Check it if you want.

Bye,

El_Choni
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.

El_Choni,

I just DL'ed your library and will take a look at it.

I wonder if I didn't get your e-mail for the same reason I haven't been getting any e-mail notifications of message topics that I've subscribed to.

Could the forum's e-mail system be malfunctioning? Is anyone else having this problem? It started about a month ago.

Eric
Originally posted by El_Choni

@ebs: yes, I sent you a message with the forum's e-mail poster with this link:

http://www.terra.es/personal5/temporald/SQLite_1.0.zip

I'd like you to check it and tell me what you think of the little changes it has from the functions you posted, and your suggestions, etc.

@blueb: I only converted ebs's wrapping functions to a purelib, nothing new. Check it if you want.

Bye,

El_Choni
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 Choni,
I download the library and work very well.
In the last week I see the sources of ODBC. Is possible that this sources can helpyou for the inconvenience of work only with one open table.
In the ODBC is unlimited.
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 El_Choni.

Thanks, Manolo. There's no problem with extending the lib so it can handle several tables at a time, it's only me (I'm a bit lazy :wink: I'll try to do it in the next two weeks.

El_Choni
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.

El_Choni,

The changes you made to my routines look fine. In fact, I prefer your method of keeping the DB_Handle "inside", so it doesn't have to be passed to each routine.

I made my wrapper functions copy the table data into an array for two reasons:

I couldn't think of an easy way to make a PureBasic array point to the block of memory returned by the get_table() function.

I though it might be safer to copy the data and free the table memory in the function, so the user didn't have to remember to do it.

Please let me know if/when you extend the library for multiple tables.

Regards,
Eric
Originally posted by El_Choni

Thanks, Manolo. There's no problem with extending the lib so it can handle several tables at a time, it's only me (I'm a bit lazy :wink: I'll try to do it in the next two weeks.

El_Choni
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.

Thanks El_Choni,

I downloaded the ZIP file and will play with it tonight.

Thanks,
blueb
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 Blair.

Guys, I originally posted this question to the wrong tread. I have been trying to get this bit of code to work and I can not seem to get it to run. I have downloaded SqLite.dll and placed it in the compliers
directory. But I get the error 193 include file not found. So I guess what I need is a step by step guide. Like what folder does the .dll go in. What .dll do I need to get is it the one found on the WEB site called sqlite.dll? Once I get it up and running I will be able to modify the code to make it do what I want but I need it to run before I can start the learning curve.

thanks.

Blair
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 Blair

Guys, I originally posted this question to the wrong tread. I have been trying to get this bit of code to work and I can not seem to get it to run. I have downloaded SqLite.dll and placed it in the compliers
directory. But I get the error 193 include file not found. So I guess what I need is a step by step guide. Like what folder does the .dll go in. What .dll do I need to get is it the one found on the WEB site called sqlite.dll? Once I get it up and running I will be able to modify the code to make it do what I want but I need it to run before I can start the learning curve.

thanks.

Blair

Hi Blair,

1 Step: Download SQLite from: http://www.hwaci.com/sw/sqlite/

2 Step: Decompress in one directory C:\SQLite

3 Step: Search sqlite.dll and copy to directory that you prefer

5 Step: Compile and run the EBS sources

6 Step: Go to El_Choni directory

7 Step: Go to PureLibraries\UserLibraries

8 Step: Copy SQLite from this library to :\PureBasic\PureLibraries\UserLibraries

9 Step: PLEASE Read the El_Chonis HELP

10 No problem. All it`sOK :)

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 ebknoppert.

Is there someone being able to *create* a table using .._exec and then populate it?

I have no errors but i can't see the table using easysqlite..

Thanks!
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 El_Choni.

I think you must create the table using sqlite.exe dbase.db

El_Choni
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 ebknoppert

Is there someone being able to *create* a table using .._exec and then populate it?
SQLite v1.0 library was great! No problem to create tables etc.
But since version v1.11 i have a bunch of problems.
Create and exec dosent work anymore. And after tests, now
i cannot compile the source. There comes error message "cant
create purebasic.exe" What happen???

Dear El_Choni! Pleae help!!!!

(PB 3.51 W2k)
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 dige
Originally posted by ebknoppert

Is there someone being able to *create* a table using .._exec and then populate it?
SQLite v1.0 library was great! No problem to create tables etc.
But since version v1.11 i have a bunch of problems.
Create and exec dosent work anymore. And after tests, now
i cannot compile the source. There comes error message "cant
create purebasic.exe" What happen???

Dear El_Choni! Pleae help!!!!

(PB 3.51 W2k)
Hi digi,
Not exist problem with the 1.11, only one. Close the tables after all sql calls for clear the memory and the program compile and worh without problem.
Today El_Choni will solve the problem with the 1.3 version.
Regards,

Manolo
Post Reply