Re: [sqlite] sqlite3_close doesn't release always the file handle.

2006-09-22 Thread Will Leshner
On 9/22/06, Ran <[EMAIL PROTECTED]> wrote: What I do is to open a database, and start a transaction in it. Then, without ending the transaction, open again the database and simply close it. I found out, that the inner sqlite3_close return 0 (SQLITE_OK), but the file handle is not released. So

[sqlite] version 3.3.4

2006-09-22 Thread nick700
Hi all, Anyone knows where I could download the precompiled binary of version 3.3.4 from? Thank you in advance, -Nick

Re: [sqlite] Locking problems

2006-09-22 Thread He Shiming
Hi ! I'm getting a lots of "database is locked" (code:5). My app keeps giving up on one machine, it might be that there is a network problem but I not 100% sure. Anyway, when the app hangs all the other machines including the machine where the database file is get the "database is locked"

[sqlite] Locking problems

2006-09-22 Thread Martin Alfredsson
Hi ! I'm getting a lots of "database is locked" (code:5). My app keeps giving up on one machine, it might be that there is a network problem but I not 100% sure. Anyway, when the app hangs all the other machines including the machine where the database file is get the "database is locked"

Re: [sqlite] Citing Triggers As Constraints

2006-09-22 Thread Rich Shepard
On Fri, 22 Sep 2006, Dennis Cote wrote: The table must exist before the triggers can be created. The triggers are associated with the table by naming the table in the trigger's create statement, not by naming the trigger in the table's create statement. Dennis, I wondered about that after

Re: [sqlite] Citing Triggers As Constraints

2006-09-22 Thread Dennis Cote
Rich Shepard wrote: For some of the tables I have foreign key triggers that apply to INSERT, UPDATE, and DELETE. When I create the table, do I explicitly name each one as an table constraint? Example, I have three foreign key triggers, fki_comp_cat, fku_comp_cat, and fkd_comp_cat that

Re: [sqlite] Re: sqlite3_get_table and non-strings

2006-09-22 Thread Dennis Cote
Mark Richards wrote: I suppose this has already been broached when the design of sqlite3_get_table was addressed. Mark, Actually this wasn't broached at that time, because when the sqlite_get_table API was designed, sqlite was typeless. All data was stored as strings, so it was natural to

[sqlite] Citing Triggers As Constraints

2006-09-22 Thread Rich Shepard
For some of the tables I have foreign key triggers that apply to INSERT, UPDATE, and DELETE. When I create the table, do I explicitly name each one as an table constraint? Example, I have three foreign key triggers, fki_comp_cat, fku_comp_cat, and fkd_comp_cat that ensure that records in the

Re: [sqlite] Re: Re: sqlite3_get_table and non-strings

2006-09-22 Thread Mark Richards
>>I can't help but notice that verb field is declared as TEXT(80) in the >>database, but char[16] in your structure. I couldn't help notice that you noticed. :) >>If you mean an instance of a structure, then of course you can >> allocate one on the heap. Yes, that's what I meant to say. Thanks

[sqlite] Re: Re: sqlite3_get_table and non-strings

2006-09-22 Thread Igor Tandetnik
Mark Richards <[EMAIL PROTECTED]> wrote: Ha! Good question. I suppose this has already been broached when the design of sqlite3_get_table was addressed. My first thought would be to pass sqlite3_get_table a structure that represents the table in field-order. ie: CREATE TABLE sequence

Re: [sqlite] Re: sqlite3_get_table and non-strings

2006-09-22 Thread Mark Richards
> Do you expect sqlite3_get_table to look at char*** pointer and somehow > guess that it's a structure, and figure out types of individual > fields? How would you go about implementing something like that? Ha! Good question. I suppose this has already been broached when the design of

[sqlite] Re: sqlite3_get_table and non-strings

2006-09-22 Thread Igor Tandetnik
Mark Richards <[EMAIL PROTECTED]> wrote: Although it does not appear to be mentioned in the documentation, is it correct to assume that sqlite3_get_table can only handle string datatypes? It can read any data type from the database, but it converts everything to strings before returning to

[sqlite] sqlite3_get_table and non-strings

2006-09-22 Thread Mark Richards
Although it does not appear to be mentioned in the documentation, is it correct to assume that sqlite3_get_table can only handle string datatypes? In a particular problem I am working a query is made to return an integer and three string fields. The issue may have more to do with the wrapper

[sqlite] sqlite3_close doesn't release always the file handle.

2006-09-22 Thread Ran
Hi all, I *think* that sqlite3_close behave strangly. I use version 3.3.7 on Linux (Fedora Core 5). What I do is to open a database, and start a transaction in it. Then, without ending the transaction, open again the database and simply close it. I found out, that the inner sqlite3_close

Re: [sqlite] Performance question

2006-09-22 Thread Dennis Cote
Michael Wohlwend wrote: But If I do "select data from pictures where (x between high_x and low_x) and (y between high_y and low_y) then this takes ca. 8 seconds (!) on wince. Michael, If you are really writing your between clauses as above with the high limit first, then they are not

Re: [sqlite] Performance question

2006-09-22 Thread Martin Jenkins
Michael Wohlwend wrote: I made a database of little pictures, which includes x und y coordinates and Are x and y indexed? Martin - To unsubscribe, send email to [EMAIL PROTECTED]

Re: [sqlite] Wish to store a C structure in sqlite column

2006-09-22 Thread Martin Jenkins
Narendran wrote: > thanks a lot, > I am unable to resolve the problem for 3 days,hat's off to everyone. As far as I know, all technologies which transfer data between machines (e.g. RPC), languages (e.g. JNI) or wear the cross platform crown (e.g. SQLite) have some sort of data definition.

Re: [sqlite] Wish to store a C structure in sqlite column

2006-09-22 Thread AJ
Narendran wrote: thanks a lot, I believe i can store a structure now, but there is still a cache . I am in the process on creating a Independant API,I can store a structure in SQLite thro the above specified ways. what if some one else wants to use my API's which i used to create the DBI's

AW: [sqlite] Performance question

2006-09-22 Thread Michael Wohlwend
-Ursprüngliche Nachricht- Von: Gerald Dachs [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 22. September 2006 11:28 An: sqlite-users@sqlite.org Betreff: Re: [sqlite] Performance question >My sql knowledge may be a little bit rusty and I have really no idea how sqlite is doing "between"

Re: [sqlite] Performance question

2006-09-22 Thread Gerald Dachs
> But If I do "select data from pictures where (x between high_x and low_x) > and (y between high_y and low_y) then this takes ca. 8 seconds (!) on > wince. My sql knowledge may be a little bit rusty and I have really no idea how sqlite is doing "between" querys. Anyway, once I have learned never

Re: [sqlite] Wish to store a C structure in sqlite column

2006-09-22 Thread Noel Frankinet
Narendran a écrit : thanks a lot, I believe i can store a structure now, but there is still a cache . I am in the process on creating a Independant API,I can store a structure in SQLite thro the above specified ways. what if some one else wants to use my API's which i used to create the DBI's

[sqlite] Performance question

2006-09-22 Thread Michael Wohlwend
Hi, I made a database of little pictures, which includes x und y coordinates and a blob (between 100 and 8000 bytes in size, one blob, total db size 180MB). If I do "select data from pictures where x=? And y=?" this works well, also on wince (measured myself: 1 such a select take 5

Re: [sqlite] Wish to store a C structure in sqlite column

2006-09-22 Thread Narendran
thanks a lot, I believe i can store a structure now, but there is still a cache . I am in the process on creating a Independant API,I can store a structure in SQLite thro the above specified ways. what if some one else wants to use my API's which i used to create the DBI's ,and the destination

Re: [sqlite] Wish to store a C structure in sqlite column

2006-09-22 Thread AJ
I hackish method might be something like this: struct s { ... }; struct s myS; char buf[sizeof(s)*2]; // *2 as base64 encoding will be approx 33% bigger. base64_encode( , buf, sizeof(s) ); INSERT INTO table ( myTextField ) VALUES ( 'buf' ); then retrieval is the opposite.

Re: [sqlite] Wish to store a C structure in sqlite column

2006-09-22 Thread Noel Frankinet
Narendran a écrit : Noel Frankinet wrote: Narendran a écrit : Dear Friends, I am in the process of forming a Generic API,(sql oriented and BerkelyDB and sister databases). In the process of integration ,i like to store a Structure in Sqlite. as far as my knowledge SQLITE

Re: [sqlite] Wish to store a C structure in sqlite column

2006-09-22 Thread He Shiming
Dear Friends, I am in the process of forming a Generic API,(sql oriented and BerkelyDB and sister databases). In the process of integration ,i like to store a Structure in Sqlite. as far as my knowledge SQLITE allows me to declare the column types suppoted by the programming languare or say

Re: [sqlite] Disabling locking?

2006-09-22 Thread He Shiming
I want to use SQLite with only one user executing queries sequentially , so I don't need locking. Is there a simple way to completely disabling locking? Specific instructions if possible please, thanks... There are two kinds of locks. First one is a file lock, as in functions returning

Re: [sqlite] Wish to store a C structure in sqlite column

2006-09-22 Thread Narendran
Noel Frankinet wrote: > > Narendran a écrit : >> Dear Friends, >> >> >> I am in the process of forming a Generic API,(sql oriented and >> BerkelyDB >> and sister databases). In the process of integration ,i like to store a >> Structure in Sqlite. >> >> as far as my knowledge SQLITE allows