Re: [sqlite] SQLite now supports ALTER Table?
Raymond Irving wrote: Hey check this out: This SQLiteDB php class allows you to use ALTER TABLE with your sqlite database. http://code.jenseng.com/db/ I'd really be interested to know how they handle tables with UNIQUE columns, because those are tricky.
[sqlite] SQLite now supports ALTER Table?
Hey check this out: This SQLiteDB php class allows you to use ALTER TABLE with your sqlite database. http://code.jenseng.com/db/
Re: [sqlite] Table locked when trying to delete a record whilst a cursor to the table is open
One work around is to load the results of your SELECT into a TEMP table, then loop through the TEMP table to do your DELETEs. SQLite does allow you to delete, update, or insert tables from within the middle of a select as long as the tables being updated, deleted, or inserted are distinct from those being queried. Hi, Thanks I think I will indeed use a temporary table instead. It will probably use less memory and less hassle than me caching all the results myself. Thanks again Andrew -- Andrew Clark
Re: [sqlite] Library routine called out of sequence
Guillaume Fougnies wrote: You are probably working in a threaded environment and a sqlite* is shared by at least two threads. Even more common than that is calling sqlite3_step() after a prior call to sqlite3_finalize(). Basically, you are misusing the API. Instead of just segfaulting, SQLite was nice to you and gave you an error message. -- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565
Re: [sqlite] Library routine called out of sequence
You are probably working in a threaded environment and a sqlite* is shared by at least two threads. bye. Fri, Oct 22, 2004 at 10:44:22AM +0200: P. Morandi wrote: > Hi everybody. > Does anybody know the main causes of error 'Library routine called out of sequence' > after a sqlite_exec() calling? > > Thank you. > P. Morandi -- Guillaume FOUGNIES
Re: [sqlite] Table locked when trying to delete a record whilst a cursor to the table is open
Hi, My program model in effect was a Component based model whereby I created an Object Enumerator which is currently implemented as an SQLite Select Query and whilst enumerating the objects I was then calling Delete() on some objects to tell them to destroy. The problem with SQLite was that i wasn't able to delete because the query was still active. I believe the best way to implement this is going to be to cache the results after creating the enumerator and then use the results cache to return an object from the enumerator. Although i suppose I could try and do as you said and cache the objects to be deleted into a list and then destroy them at the end of the enumerator. It's a pity it couldn't have been implemented in SQLite though to be more flexible. Thanks anyway Andrew -- Andrew Clark
Re: [sqlite] Table locked when trying to delete a record whilst a cursor to the table is open
Clay Dowling wrote: Andrew, What you're trying to do won't work. Clay is correct. The btree code in SQLite will get confused if you delete (or otherwise modify) entries in a table while SQLite is trying to scan that table. This means that you cannot do a DELETE on the table in the middle of a SELECT on the same table. This, in turn, means that you cannot do cursor-like things in SQLite. One work around is to load the results of your SELECT into a TEMP table, then loop through the TEMP table to do your DELETEs. SQLite does allow you to delete, update, or insert tables from within the middle of a select as long as the tables being updated, deleted, or inserted are distinct from those being queried. There is currently some discussion of enhancing the btree layer so that it can support a DELETE on a table that is simultaneously being queried (provided that both happen in the same database connection - this is not a form of concurrency.) This can get very tricky, though, if the SELECT is really a join. If an when such changes are made, Andrew's code should start working. -- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565
Re: [sqlite] Wich compiler to use in Windows
Cory Nelson wrote: Use the Visual C++ Toolkit. http://msdn.microsoft.com/visualc/vctoolkit2003/ It is free, and optimizes much better than MinGW and LCC-Win32. I can't compare it to Borland's, I've never used that one. On Wed, 20 Oct 2004 10:41:25 -0200, Rubens Jr. <[EMAIL PROTECTED]> wrote: Hi ! Wich compiler do you recomend to use to compile sqlite3.0.8 in Windows ? I downloaded and installed the Visual C++ Toolkit in the D:\VCToolkit2003 folder. It didn't like the .NET Framework configuration that I had but I finally got it installed. Besides the limited information that comes with this toolkit I have found very little other information on how to use it. Could you post how you build the dll for 3.x sqlite and any error messages that you get? Thanks Corwin
[sqlite] Temp Store
Hi there, Sorry to bother you with a simple question, but where does this reside by default (i.e. file)? I have changed my project to use in-memory temp-store, but the program won't start as the temp store already exists on disk. I can't locate the file however - I have deleted the db file and the journal, but still get the following: "The temporary database already exists - its location cannot now be changed" Many thanks. Steve
[sqlite] Library routine called out of sequence
Hi everybody. Does anybody know the main causes of error 'Library routine called out of sequence' after a sqlite_exec() calling? Thank you. P. Morandi