Re: [sqlite] Foreign keys and Temp Tables

2010-02-08 Thread Dan Kennedy
On Feb 9, 2010, at 8:54 AM, Paul Vercellotti wrote: > > > Hi there, > > Are there any restrictions in SQLite on foreign key references in > temporary tables? Is referential integrity enforced between temp > tables and persistent ones? (That is, does the referential integrity > checking

Re: [sqlite] Bug / Feature: CREATE VIRTUAL TABLE IF NOT EXISTS

2010-02-08 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hamish Allan wrote: > Whether it's > storage-backed or not, won't attempting to create it a second time > always give a "table already exists" error? Yes. But so what? Your code is already specific to SQLite - ignore the error! > Also, what is the

Re: [sqlite] SQlite vs. SQlite3 - a beginners question

2010-02-08 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Simon Slavin wrote: > SQLite3 is any version of SQLite from 3.0.0 upwards. In the move from 2.x.x > to 3.x.x there were so many changes in how SQLite worked internally that it > was almost a different product. The changes aren't actually that big.

Re: [sqlite] SQlite vs. SQlite3 - a beginners question

2010-02-08 Thread Simon Slavin
On 9 Feb 2010, at 3:17am, Richard Cooke wrote: > I'm trying to teach myself PHP and SQLite and I've tried to understand > whether SQLite and SQLite3 are the same animal or are they completely > different. I am using WAMP on a PC and the PHP version is 5.31. If I > use sqlite_libversion(); I

Re: [sqlite] SQlite vs. SQlite3 - a beginners question

2010-02-08 Thread Alex Mandel
Richard Cooke wrote: > I'm trying to teach myself PHP and SQLite and I've tried to understand > whether SQLite and SQLite3 are the same animal or are they completely > different. I am using WAMP on a PC and the PHP version is 5.31. If I > use sqlite_libversion(); I get a result of 2.8.17. If

[sqlite] SQlite vs. SQlite3 - a beginners question

2010-02-08 Thread Richard Cooke
I'm trying to teach myself PHP and SQLite and I've tried to understand whether SQLite and SQLite3 are the same animal or are they completely different. I am using WAMP on a PC and the PHP version is 5.31. If I use sqlite_libversion(); I get a result of 2.8.17. If I use SQLite3::version() I

[sqlite] Foreign keys and Temp Tables

2010-02-08 Thread Paul Vercellotti
Hi there, Are there any restrictions in SQLite on foreign key references in temporary tables? Is referential integrity enforced between temp tables and persistent ones? (That is, does the referential integrity checking take into account key references in a temp table to a regular table's

Re: [sqlite] Downloading older version of sqlite

2010-02-08 Thread D. Richard Hipp
On Feb 8, 2010, at 5:10 PM, Fantoosh wrote: > Hi All, > > I need to download an older version of sqlite - 3.5.3. Any ideas on > how/where > i can get this version? I looked at the CVS branches/tags and I > couldn't find > one that said 3.5.3. http://www.sqlite.org/src/info/a39007d5b1 D.

[sqlite] Downloading older version of sqlite

2010-02-08 Thread Fantoosh
Hi All, I need to download an older version of sqlite - 3.5.3. Any ideas on how/where i can get this version? I looked at the CVS branches/tags and I couldn't find one that said 3.5.3. Thanks. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Bug / Feature: CREATE VIRTUAL TABLE IF NOT EXISTS

2010-02-08 Thread Hamish Allan
On Mon, Feb 8, 2010 at 9:26 PM, Roger Binns wrote: > Virtual tables do not directly have any storage - they are just a row in > sqlite_master. > > The implementation may do something.  For example FTS3 creates 3 real tables > behind the scenes.  Virtual tables that map to

Re: [sqlite] Bug / Feature: CREATE VIRTUAL TABLE IF NOT EXISTS

2010-02-08 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hamish Allan wrote: > The workaround suggested on the tracker ("Couldn't you just do a 'drop > table if exists' first?") does not make sense, as it ensures the > emptiness of the table rather than just its existence. Virtual tables do not directly

Re: [sqlite] any command to find last rowid in a table

2010-02-08 Thread Shane Harrelson
Assuming you have a table with the following schema: CREATE TABLE t1 ( id INTEGER PRIMARY KEY AUTOINCREMENT, col2 REAL, col3 TEXT ); your C code *could* look something like the following: sqlite3_exec(db, "INSERT INTO t1 (col2,col3) VALUES (1.0,'row one');", 0, 0, 0);

Re: [sqlite] any command to find last rowid in a table

2010-02-08 Thread Vasanta
I understand "SELECT last_insert_rowid()" gives rowird, but I have to call these SQL statements in C language code, for that I have to sqlite3_prepare and sqlite3_step() calls, I am looking for sample of sqlite3_step, how that return the rowid, can I call like this: int rowid; sqlite3_stmt

[sqlite] Performance regression with many joins (3.6.11 -> 3.6.{21, 22})

2010-02-08 Thread Andreas Klöckner
(I had trouble posting this to the mailing list--I've tried a number of times from various addresses, but the message never showed up in the archive. I am thus trying again.) Hi there, I'm running the query: select dg_order,

Re: [sqlite] any command to find last rowid in a table

2010-02-08 Thread Kees Nuyt
On Mon, 8 Feb 2010 11:44:39 -0500, Vasanta wrote: > I tried to use this function call > "sqlite3_last_insert_rowid()" > calling from C language function, but it always returns zero, any idea?. > I have valid DB handle. The

[sqlite] Bug / Feature: CREATE VIRTUAL TABLE IF NOT EXISTS

2010-02-08 Thread Hamish Allan
Hi, I was surprised to find the "IF NOT EXISTS" syntax missing from "CREATE VIRTUAL TABLE". I googled and found: http://www.sqlite.org/cvstrac/tktview?tn=2604 The workaround suggested on the tracker ("Couldn't you just do a 'drop table if exists' first?") does not make sense, as it ensures the

Re: [sqlite] any command to find last rowid in a table

2010-02-08 Thread Vasanta
I tried to use this function call "sqlite3_last_insert_rowid()" calling from C language function, but it always returns zero, any idea?. I have valid DB handle. On Sat, Feb 6, 2010 at 9:25 AM, Vasanta wrote: > I found this

Re: [sqlite] system.data.sqlite & encryption

2010-02-08 Thread Shane Harrelson
I've taken a cursory glance at the encryption support in the system.data.sqlite C# wrapper from http://sqlite.phxsoftware.com It does appear, that you could, with a little effort, modify the wrapper to work with the SEE extension. I don't see anything in the wrapper that would make it

Re: [sqlite] system.data.sqlite & encryption

2010-02-08 Thread Shane Harrelson
I've taken a cursory glance at the encryption support in the system.data.sqlite C# wrapper from http://sqlite.phxsoftware.com It does appear, that you could, with a little effort, modify the wrapper to work with the SEE extension. I don't see anything in the wrapper that would make it

Re: [sqlite] Multi-Table constraint

2010-02-08 Thread German Escallon
Uhmm.. Interesting. Thanks for your help. Jay A. Kreibich wrote: > On Fri, Feb 05, 2010 at 06:42:34PM -0500, German Escallon scratched on the > wall: > > >> create table X(xid integer primary key); >> create table Y(yid integer primary key, y_xid references X(xid) ); >> create table Z(zid

Re: [sqlite] any command to find last rowid in a table

2010-02-08 Thread Robert Citek
On Mon, Feb 8, 2010 at 9:31 AM, Vasanta wrote: > Can I use this function call in C code to return last rowid to be inserted?. On Fri, Feb 5, 2010 at 2:50 PM, Petite Abeille wrote: > Help Vampires: A Spotter’s Guide >

Re: [sqlite] any command to find last rowid in a table

2010-02-08 Thread Vasanta
Can I use this function call in C code to return last rowid to be inserted?. On Sat, Feb 6, 2010 at 9:25 AM, Vasanta wrote: > I found this C function call, this solved my problem, > sqlite3_last_insert_rowid(), > I just