Re: [sqlite] Unable to open database file

2010-03-12 Thread Roger Binns
Timo wrote: > OperationalError: unable to open database file Note that there is a group specifically for using Python with SQLite: http://groups.google.com/group/python-sqlite Unfortunately SQLite's error reporting isn't particularly detailed when opening databases. There are a lot of things

Re: [sqlite] Porting Sqlite to MQX OS: Question 2

2010-03-12 Thread Kees Nuyt
On Fri, 12 Mar 2010 02:22:31 -0800 (PST), GeoffW wrote: > >Hi > >Now I have got a half ported version of Sqlite up and running on MQX I cant >put off any longer the question of file locking and how I tackle that ? For >the moment i had made the xLock() and xUnlock() the

Re: [sqlite] Fastest concurrent read-only performance (+ threads vsprocesses) [BUG?]

2010-03-12 Thread Luke Evans
Just to be clear, from my point of view at least, the big difference is between: - Multiple threads performing concurrent queries (with or without the shared cache) vs - Multiple processes performing concurrent queries In the latter case (for a number of queries chosen to lie within the

Re: [sqlite] Way to close statement without finalize

2010-03-12 Thread Pavel Ivanov
Actually, sqlite3_reset() does release the lock on the database. What made you think differently? Pavel On Fri, Mar 12, 2010 at 3:17 PM, TeDe wrote: > Hello Folks, > > I'm looking for a way to close a statement, but do not want to finalize > it. I have 2 statement I would like

[sqlite] Way to close statement without finalize

2010-03-12 Thread TeDe
Hello Folks, I'm looking for a way to close a statement, but do not want to finalize it. I have 2 statement I would like to execute in a loop. Since I want to reuse them, I do not want to finalize them. Unfortunately sqlite3_reset() does not release the lock on the database. So I need a function

Re: [sqlite] Sqlite without 64-bit integers?

2010-03-12 Thread Dave Toll
I have been successfully using SQLite on a 32-bit embedded system for some time without any problems - you can add -DSQLITE_INT64_TYPE=long to the compile line, no need to hack the source. The only issue I have seen is that it is not possible to use -DSQLITE_DEBUG as it enables some assert() calls

[sqlite] Unable to open database file

2010-03-12 Thread Timo
Hello, Lately I got some messages from a couple of user who get the following error message when using my program: OperationalError: unable to open database file I myself (and lots of others) have no problem at all. I searched a bit and found some with the same problem. They all solved it by

Re: [sqlite] novice question: marrying SQLite 3.6.19 with CGI::Application 4.31

2010-03-12 Thread P Kishor
On Fri, Mar 12, 2010 at 10:51 AM, William Bulley wrote: > I am trying to learn CGI::Application using this "tutorial": > >   > > Inside the accompanying application files from: > >  

[sqlite] novice question: marrying SQLite 3.6.19 with CGI::Application 4.31

2010-03-12 Thread William Bulley
I am trying to learn CGI::Application using this "tutorial": Inside the accompanying application files from: the example CGI::Application source code uses DBI to connect with MySQL.

Re: [sqlite] rowid availability from views is inconsistent

2010-03-12 Thread Alexey Pechnikov
Hello! On Friday 12 March 2010 11:47:40 Ben Harper wrote: > Is there some recommended workaround that I can use to ensure that I always > get non-null rowids with every VIEW? > > CREATE TABLE one (i32 INTEGER); > INSERT INTO one VALUES(100); > INSERT INTO one VALUES(200); > CREATE VIEW v1 AS

Re: [sqlite] if exist

2010-03-12 Thread Igor Tandetnik
Jean-Christophe Deschamps wrote: >> Yours returns 1 or 0. Mine returns length if found, otherwise 0. > > That's true but the subject title led me to believe that the OP > intended to have a 0 vs. nonzero return for not-exists vs exists condition. Perhaps. Nevertheless, the answer to your

Re: [sqlite] if exist

2010-03-12 Thread Jean-Christophe Deschamps
>Yours returns 1 or 0. Mine returns length if found, otherwise 0. That's true but the subject title led me to believe that the OP intended to have a 0 vs. nonzero return for not-exists vs exists condition. ___ sqlite-users mailing list

Re: [sqlite] if exist

2010-03-12 Thread Igor Tandetnik
Jean-Christophe Deschamps wrote: >> Andrea Galeazzi wrote: >>> I've got a table T made up of only two fields: INT id (PRIMARY KEY) and >>> INT length. >>> I need a statement in order to yield 0 when the key doesn't exist. >> >> Well, "select 0;" fits your spec (you never said what should be >>

Re: [sqlite] rowid availability from views is inconsistent

2010-03-12 Thread Ben Harper
I only have this problem when I'm using a view on virtual tables, and since I have complete control over them, I guess I could just explicitly declare a rowid INTEGER PRIMARY KEY column for my virtual tables, and that should solve the problem. Thanks, Ben -Original Message- From:

Re: [sqlite] if exist

2010-03-12 Thread Jean-Christophe Deschamps
>Andrea Galeazzi wrote: > > I've got a table T made up of only two fields: INT id (PRIMARY KEY) and > > INT length. > > I need a statement in order to yield 0 when the key doesn't exist. > >Well, "select 0;" fits your spec (you never said what should be >returned when the key does exist). I

[sqlite] Porting Sqlite to MQX OS: Question 2

2010-03-12 Thread GeoffW
Hi Now I have got a half ported version of Sqlite up and running on MQX I cant put off any longer the question of file locking and how I tackle that ? For the moment i had made the xLock() and xUnlock() the same as in osWin.c version but with the Windows lock() and unlock() function calls

Re: [sqlite] rowid availability from views is inconsistent

2010-03-12 Thread Simon Slavin
On 12 Mar 2010, at 8:47am, Ben Harper wrote: > Under certain conditions, VIEWs do not have rowid values. > > Is there some recommended workaround that I can use to ensure that I always > get non-null rowids with every VIEW? > > CREATE TABLE one (i32 INTEGER); > INSERT INTO one VALUES(100); >

Re: [sqlite] Porting Sqlite to MQX Operating system

2010-03-12 Thread GeoffW
hello I thought I had better update this and confess to my sins. Good job no one is reading this thread as it is an embarassingly stupid mistake :rules: I cant believe I did this and then took so long to spot it. int sqlite3_os_init(void) { static sqlite3_vfs mqxVfs = { 1,

Re: [sqlite] Fastest concurrent read-only performance (+ threads vsprocesses) [BUG?]

2010-03-12 Thread Marcus Grimm
Hi again, I have played again with some variations of the speed test: I'm not able to reproduce the reported behavior that a single process queries faster than a single thread. During my tests I don't get a big difference, even when I turn off some of the locking via SQLITE_OPEN_NOMUTEX. I have

[sqlite] rowid availability from views is inconsistent

2010-03-12 Thread Ben Harper
Under certain conditions, VIEWs do not have rowid values. Is there some recommended workaround that I can use to ensure that I always get non-null rowids with every VIEW? CREATE TABLE one (i32 INTEGER); INSERT INTO one VALUES(100); INSERT INTO one VALUES(200); CREATE VIEW v1 AS SELECT *