Page 2 of 4

Posted: Thu Jun 10, 2004 11:35 pm
by Karbon
That is what you are trying to do with SQLiteExec(SQL), access the database :-)

Posted: Fri Jun 11, 2004 12:16 pm
by ebs
Mitch,

Right! SQLiteExec writes data to the database.
But the problem is that I don't get an error when I try to read data using SQLiteGetTable().
I would expect an error when trying to read or write a disconnected database.

Eric

Posted: Fri Jun 11, 2004 12:30 pm
by Karbon
SQLiteExec runs an SQL query, which could read or write to the database depending on the query..

I would say that the results of a SELECT are stored in memory for access (probably why you can loop through a result set after the database is gone).. You should get an error the next time the library needs to look at the database file - which should be upon initial execution of the query and gathering of results (be that query a SELECT,INSERT,UPDATE or the like)..

Posted: Fri Jun 11, 2004 12:35 pm
by Karbon
Do a FileSize() on the database file to see if it still exists before trying to run any queries on it..

Posted: Fri Jun 11, 2004 12:48 pm
by ebs
Mitch,

By definition, SQLiteExec only executes INSERT or UPDATE queries, which DO NOT return any results. SQLiteGetTable runs SELECT queries which return data which is indeed stored in memory. When you execute SQLiteRemoveData(), retrieved table data is removed from memory.

The question remains: why does SQLiteGetTable() return a 0 (success) when it can not connect to the database file, because the network is disconnected?

Posted: Fri Jun 11, 2004 1:07 pm
by Karbon
If I could read it would help - wouldn't it!

I don't know why one would return success and the other fail.. Crazy for sure..

Smack me. It's early and I haven't had any coffee.

Posted: Mon Jun 14, 2004 4:37 pm
by El_Choni
If SQLiteGetTable() returns 0, it has failed (it's different from the other functions). The returned value is a pointer to a strings array with the returned data.

Regards,

Posted: Fri Jun 18, 2004 6:22 pm
by ebs
El,

So that's it!

There's an error in your SQLite.txt help file, because the description of SQLiteGetTable() says:

- IMPORTANT: result=0 means the function succeeded. If you get any other return value, call SQLiteError(result) to find out the error.

Eric

Posted: Tue Jul 13, 2004 3:06 pm
by Klonk
Are there any plans to adept the Userlib to work with SQLite 3.0.x? Or does it already work with it (I don't think so)?

Posted: Tue Jul 13, 2004 3:57 pm
by El_Choni
Hi,

Next SQLite PureLibrary release will support both SQlite 2 and SQLite 3 dlls. Since this release has been waiting too much, my plan is to delay the release of the final version of TailBite (which will be, anyway, much like the current beta plus some goodies) and concentrate in SQLite.

Any suggestions are welcome, although I think the current wrapping functions set is enough.

Regards,

Posted: Tue Jul 13, 2004 7:07 pm
by Klonk
Nice to hear that, thanks.

Tailbite = really cool and useful piece of software. Thanks for sharing BTW

Posted: Wed Jul 14, 2004 6:39 pm
by Shannara
Any way to have something like a recordset (vb term, I guess), maybe something like a structure that is filled with records so it'll be easier to move through them or some such? nvm, i donno.

Posted: Wed Jul 14, 2004 6:53 pm
by El_Choni
I don't know if this is what you mean... You can access the data from a table with an *array(), as the example included with SQLite shows. But you can also use SQLiteData().

Posted: Sun Sep 05, 2004 1:08 pm
by Karbon
Hey Choni - any status updates for us?

Posted: Sun Sep 12, 2004 6:17 am
by Shannara
Thanks for the answer Chron :)

But if its access via an array, and different fields have different types (aka, string, long, etC), and since PB Arrays cannot handle different types...how does that work?

Also, any updates on this lib? :D