[sqlite] What does SQLITE_IOERR_TRUNCATE mean, exactly?

2009-08-17 Thread John Belli
I have a broken database file, with a journal. It is opened read-only (via sqlite3_open_v2()). The statement "PRAGMA user version" is prepared successfully. When sqlite3_step() is called, the return code is SQLITE_IOERR. The extended code is SQLITE_IOERR_TRUNCATE. What exactly does this mean?

[sqlite] Multithreaded vs. serialized

2009-01-14 Thread John Belli
Assuming I've decided to use evil threads, and am opening a new connection in each thread, does it matter whether I use multithreaded (-DSQLITE_THREADSAFE=2) or serialized (-DSQLITE_THREADSAFE=1)? Any idea if one is faster than the other? I am using SQLite on Win32 and WinCE, and I'll be using

Re: [sqlite] Compiling with mingw32/msys on Windows

2008-10-22 Thread John Belli
I got the CVS version and it mostly works, but I'm hitting a bug in mingw32 gcc now (which, after some investigation, may have been fixed in a later version than the current release). At least I can take the processed amalgamation and use it in a VS2k5 project. Note: SQLITE_ENABLE_IOTRACE doesn't

Re: [sqlite] Compiling with mingw32/msys on Windows

2008-10-22 Thread John Belli
On Wed, 22 Oct 2008 14:34:04 -0400, "Shane Harrelson" <[EMAIL PROTECTED]> wrote: >I was able to duplicate the issue, and I've updated the configure >scripts to correct the problem. OK, great. Is the tarball updated, or do I need to get it from CVS? >If you are generating your makefile using

Re: [sqlite] Transaction across different DB handles returns SQLITE_INTERNAL

2008-10-20 Thread John Belli
On Mon, 20 Oct 2008 18:01:03 + (UTC), MikeW <[EMAIL PROTECTED]> wrote: >Still, I would like to be able to run the Transaction over these two calls ... >What's the best way, given I have two separate handles ? >Make them separate Transactions and do a ROLLBACK on the first if the >second exec

Re: [sqlite] Can you perform an ATTACH-type operation just using DB handles ?

2008-10-17 Thread John Belli
On Fri, 17 Oct 2008 07:53:52 + (UTC), MikeW <[EMAIL PROTECTED]> wrote: >John Belli <[EMAIL PROTECTED]> writes: >> >> On Thu, 16 Oct 2008 17:54:52 + (UTC), MikeW >> <[EMAIL PROTECTED]> wrote: >> >> >My code has two pre-opened DB co

[sqlite] Compiling with mingw32/msys on Windows

2008-10-17 Thread John Belli
OK, I should have all the required utils, and configure apparently worked properly, but make barfs (log below): MinGW-5.1.4 MSYS-1.0.10 ActiveTcl8.5.4.0.286921-win32-ix86-threaded (after install, linked bin/tclsh85.exe to tclsh.exe) Any idea? JAB -- John A. Belli Software Engineer Refrigerated

Re: [sqlite] Can you perform an ATTACH-type operation just using DB handles ?

2008-10-16 Thread John Belli
On Thu, 16 Oct 2008 17:54:52 + (UTC), MikeW <[EMAIL PROTECTED]> wrote: >My code has two pre-opened DB connection handles, and would like to >perform an SQL operation over the two databases. >The DB filenames are not available at this point, hence an ATTACH is >not feasible. >Is there any way

Re: [sqlite] Foreign Key Triggers: ABORT, FAIL, or ROLLBACK

2008-10-16 Thread John Belli
On Tue, 14 Oct 2008 22:10:12 +0700, Dan <[EMAIL PROTECTED]> wrote: >ABORT seems right to me. Causes the current statement to have no >effect, but does not rollback the current transaction. On Tue, 14 Oct 2008 11:16:17 -0500, Stephen Woodbridge <[EMAIL PROTECTED]> wrote: >I'm not sure there is a

Re: [sqlite] Error:"Expression cannot be evaluated" withsqlite3_exec()

2008-10-16 Thread John Belli
On Thu, 16 Oct 2008 08:23:10 + (GMT), Alberto Tellaeche <[EMAIL PROTECTED]> wrote: >int ActualizarBBDDAlumnos(char *dni, float nota) >{ >char *errorMsg; > >char *orden_SQL = sqlite3_mprintf("update ALUMNO set nota=%0.1f where > dni=%Q;",nota,dni); >

Re: [sqlite] Problem with inserting and integer primary key

2008-10-16 Thread John Belli
On Wed, 15 Oct 2008 12:43:00 -0400, "Igor Tandetnik" <[EMAIL PROTECTED]> wrote: >Be aware that, in order to create a column that aliases ROWID (and thus >has special properties in SQLite, such as getting an automatically >assigned unique integer) it has to be spelled precisely INTEGER PRIMARY

[sqlite] Compiling with mingw32/msys, and using options

2008-10-16 Thread John Belli
Perhaps I just don't know how to use configure and make, but I can't figure out how to use, for example, SQLITE_ENABLE_UPDATE_DELETE_LIMIT when compiling with msys. Do I add it somehow when calling configure, when calling make, or do I edit the Makefile after configure? I am having no problem

[sqlite] Foreign Key Triggers: ABORT, FAIL, or ROLLBACK

2008-10-14 Thread John Belli
What is the recommended conflict to raise during an FK enforcement trigger? I'm not asking about how to create the triggers, I've figured that part out; I just want to know which conflict should be used. I think I'm asking, which do other db systems tend to use? JAB -- John A. Belli Software

[sqlite] Re: progress handler code changed 3.4.0

2007-06-25 Thread John Belli
On Mon, 25 Jun 2007 18:38:30 +, D. Richard Hipp wrote: >"John Belli" <[EMAIL PROTECTED]> wrote: >> If the progress handler returns non-zero, sqlite_exec is returning >> SQLITE_INTERRUPT instead of SQLITE_ABORT. Was this intentional? The >> comment says

[sqlite] progress handler code changed 3.4.0

2007-06-25 Thread John Belli
If the progress handler returns non-zero, sqlite_exec is returning SQLITE_INTERRUPT instead of SQLITE_ABORT. Was this intentional? The comment says SQLITE_ABORT, but the return is being set to SQLITE_INTERRUPT. (vdbe.c line 553) JAB