[sqlite] Does SQLite require 64-bit integers?

2008-04-03 Thread Gerhard Häring
I need to know if SQLite works at all if the platform doesn't have a 64-bit integer type. I see that SQLite has some #ifdefing like #ifdef SQLITE_INT64_TYPE that seems to be for the case when the platform does not have the type natively, but I don't see where this would actually be

Re: [sqlite] Trigger's actions and callbacks

2008-04-03 Thread Vladimir Volkov
D. Richard Hipp wrote: > > > SQLite is not reentrant through the update hook. > > > D. Richard Hipp > [EMAIL PROTECTED] > > Thanks a lot. I would consider using user-defined functions as callbacks with updated data in its parameters. -- View this message in context:

[sqlite] Count(1)

2008-04-03 Thread Mahalakshmi.m
Hi, I am having 4 records in my Harddisk. My Processor speed is 400 Mhz. For "SELECT COUNT(1) FROM MUSIC ;" its getting more time to display the count. I have also tried with "SELECT COUNT(*) FROM MUSIC ;This also take more time. Is there any other way we can get the Total number of records.

Re: [sqlite] Count(1)

2008-04-03 Thread P Kishor
On 4/3/08, Mahalakshmi.m <[EMAIL PROTECTED]> wrote: > Hi, > > I am having 4 records in my Harddisk. > My Processor speed is 400 Mhz. > > For "SELECT COUNT(1) FROM MUSIC ;" its getting more time to display the > count. > I have also tried with "SELECT COUNT(*) FROM MUSIC ;This also take

Re: [sqlite] How to recover from database corruption? (and why does it happen?)

2008-04-03 Thread Luca Olivetti
En/na Luca Olivetti ha escrit: > En/na Dennis Cote ha escrit: >> The original corruption may well have been caused by omitting the thread >> safe option on the version of SQLite you were using. > > Pheew, I hope it is really so. A quick follow-up: everything has been working fine for almost

Re: [sqlite] Count(1)

2008-04-03 Thread Ken
You could use a trigger to keep the running total in a seperate table. "Mahalakshmi.m" <[EMAIL PROTECTED]> wrote: Hi, I am having 4 records in my Harddisk. My Processor speed is 400 Mhz. For "SELECT COUNT(1) FROM MUSIC ;" its getting more time to display the count. I have also tried with

[sqlite] sqlite3_aggregate_context with C++ classes

2008-04-03 Thread Steven Fisher
Can Final be called without Step first being called? If Step is called, will Final always be called? I know the intention is to call sqlite3_aggregate_context with the size I really need and not allocate anything myself, but I want to store a pointer to a C++ class in the aggregate context.

Re: [sqlite] Count(1)

2008-04-03 Thread Scott Hess
A little bit more info: SELECT COUNT(*) is implemented as a full table scan, so SQLite is visiting every row in the table, which will get slower and slower as the table gets bigger and the database fragments. This differs from many database engines (which implement an optimization for this)

Re: [sqlite] Windows XP, where should I place the Sqlite .DLL's for best Sqlite operation, for usage with other COM components?

2008-04-03 Thread Kees Nuyt
On Thu, 3 Apr 2008 16:09:09 -0400, you wrote: > For Windows XP, where should I place the > Sqlite .DLL's for best Sqlite operation, > and for usage with other COM components? There is no easy answer, but enough information to base your decision upon:

[sqlite] sqlite3_finalize(pReadStmt); and sqlite3_close(pDB);

2008-04-03 Thread Joanne Pham
Hi All, Should we always call sqlite3_finalize(pReadStmt); and sqlite3_close(pDB) after we have done with read/write to database. Or sqlite3_finalize(pReadStmt) is good enough. Please advice what is the sequence of statement that we should call after we are done with database

Re: [sqlite] sqlite3_finalize(pReadStmt); and sqlite3_close(pDB);

2008-04-03 Thread D. Richard Hipp
On Apr 3, 2008, at 5:09 PM, Joanne Pham wrote: > Hi All, > Should we always call sqlite3_finalize(pReadStmt); and > sqlite3_close(pDB) after we have done with read/write to database. > Or sqlite3_finalize(pReadStmt) is good enough. > Please advice what is the sequence of statement that we

Re: [sqlite] sqlite3_aggregate_context with C++ classes

2008-04-03 Thread D. Richard Hipp
On Apr 3, 2008, at 3:39 PM, Steven Fisher wrote: > Can Final be called without Step first being called? Yes. > > > If Step is called, will Final always be called? Yes D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list

[sqlite] Proper use of sqlite-amalgamation.

2008-04-03 Thread Amit
Hi everyone, This is my first time diving into SQLite and I am very excited about this. Thanks to all the developers. I just had several questions regarding SQLite. While at the download page, it states that sqlite-amalgamation is the "preferred" way of acquiring SQLite code. So I went ahead and

Re: [sqlite] Windows XP, where should I place the Sqlite .DLL's for best Sqlite operation, for usage with other COM components?

2008-04-03 Thread Clark Christensen
Pretty much any folder in the PATH will do. You can put it \windows\system32\ but that can be a pain to get to and remember. I usually create one or more folders to hold non-Windows misc binaries, and add those to the system PATH. The most recent is C:\usr\bin\ for executables, and

Re: [sqlite] Proper use of sqlite-amalgamation.

2008-04-03 Thread Matthew L. Creech
On Thu, Apr 3, 2008 at 5:39 PM, Amit <[EMAIL PROTECTED]> wrote: > > 1. Is there any documentation that I may have missed that addresses > the above issue? If not, there probably should be a wiki page > regarding this. I could create a wiki page with my notes regarding > this. > There's:

Re: [sqlite] Virtual table used to query big external database

2008-04-03 Thread Scott Hess
You can _generally_ work around this kind of problem using sub-selects. So instead of: SELECT x FROM fts_table WHERE fts_table MATCH "y" OR fts_table MATCH "z"; You might write: SELECT x FROM fts_table WHERE rowid IN (SELECT rowid FROM fts_table WHERE fts_table MATCH "y") OR rowid IN (SELECT

[sqlite] 3.5.7 Compile Fails On sqlite3.c

2008-04-03 Thread Robert L Cochran
Here is what I did: tar -xvzf sqlite-3.5.7.tar.gz cd sqlite-3.5.7 mkdir bld cd !$ ../configure --prefix=/usr/local/sqlite-3.5.7 --disable-tcl --enable-threadsafe make -- (output of make is shown

Re: [sqlite] Proper use of sqlite-amalgamation.

2008-04-03 Thread Amit
On Thu, Apr 3, 2008 at 3:24 PM, Matthew L. Creech <[EMAIL PROTECTED]> wrote: > On Thu, Apr 3, 2008 at 5:39 PM, Amit <[EMAIL PROTECTED]> wrote: > > > > 1. Is there any documentation that I may have missed that addresses > > the above issue? If not, there probably should be a wiki page > >

Re: [sqlite] 3.5.7 Compile Fails On sqlite3.c

2008-04-03 Thread Robert L Cochran
Robert L Cochran wrote: > Here is what I did: > > tar -xvzf sqlite-3.5.7.tar.gz > cd sqlite-3.5.7 > mkdir bld > cd !$ > ../configure --prefix=/usr/local/sqlite-3.5.7 --disable-tcl > --enable-threadsafe > make > >

[sqlite] 3.5.7 & TCL: "undefined symbol: sqlite3StrICmp"

2008-04-03 Thread Zbigniew Baniewski
I'm sorry to confirm the problem described at http://tinyurl.com/29wc8x #v+ $ tclsh8.5 % package require sqlite3 couldn't load file "/usr/lib/sqlite3/libtclsqlite3.so.0": /usr/lib/sqlite3/libtclsqlite3.so.0: undefined symbol: sqlite3StrICmp #v- Does there exist any cure? --

Re: [sqlite] 3.5.7 & TCL: "undefined symbol: sqlite3StrICmp"

2008-04-03 Thread John Stanton
Zbigniew Baniewski wrote: > I'm sorry to confirm the problem described at http://tinyurl.com/29wc8x > > #v+ > $ tclsh8.5 > % package require sqlite3 > couldn't load file "/usr/lib/sqlite3/libtclsqlite3.so.0": > /usr/lib/sqlite3/libtclsqlite3.so.0: undefined symbol: sqlite3StrICmp > #v-

Re: [sqlite] 3.5.7 & TCL: "undefined symbol: sqlite3StrICmp"

2008-04-03 Thread Zbigniew Baniewski
On Thu, Apr 03, 2008 at 09:54:15PM -0500, John Stanton wrote: > Install TCL Another one? What for? -- pozdrawiam / regards Zbigniew Baniewski ___ sqlite-users mailing

Re: [sqlite] Proper use of sqlite-amalgamation.

2008-04-03 Thread Dimitri
Hi, > I just had several questions regarding SQLite. While at the download > page, it states that sqlite-amalgamation is the "preferred" way of > acquiring SQLite code. So I went ahead and downloaded the latest > version (3.5.7). I get 3 source files and I am stuck. I tried reading > the