[sqlite] SQLite Trace Log

2013-02-10 Thread Winston Brummer
Hi I saw in the version history that SQLite makes use of trace listeners. Could anyone give me an example of how to attach a trace listener to an application that uses System.Data.SQLite? Specifically related to the compact frame work version for Windows Mobile and Pocket PC. Any help would be

Re: [sqlite] How to get the RecNo ???

2013-02-10 Thread Mohit Sindhwani
Hi Igor, Keith, I think my explanation wasn't very clear. I just meant to say that ROWID is not a sequence number of insertion in the case when an INTEGER PRIMARY KEY is used - it comes across as a sequence number when we don't have an integer primary key. Rest of the answers less relevant

Re: [sqlite] How to get the RecNo ???

2013-02-10 Thread Keith Medcalf
> I have been caught out by this - I read what the documentation says but > just did not carefully understand it. What the above means is this: > * You do an insert in the sequence as above, you say that I should not > sort by id ASC because you want it in insertion order > * You decide then to

Re: [sqlite] How to get the RecNo ???

2013-02-10 Thread Mohit Sindhwani
Hi Peter, I have been caught out on this. On 11/2/2013 8:40 AM, Peter Aronson wrote: You can add it to the select list as OID, ROWID or _ROWID_ or, if the table has a column defined INTEGER PRIMARY KEY (but not INTEGER PRIMARY KEY DESC) it'll also be this value. See:

Re: [sqlite] "default value of column [name] is not constant." error in table creation when using double quoted string literal in parenthesis

2013-02-10 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/02/13 14:27, Simon Slavin wrote: > Any chance of killing it in SQLite 4 ? Continuing to beat a truly dead horse, it would be nice to help developers fix their existing codebase via something like an additional "lint mode".

Re: [sqlite] How to get the RecNo ???

2013-02-10 Thread Peter Aronson
You can add it to the select list as OID, ROWID or _ROWID_ or, if the table has a column defined INTEGER PRIMARY KEY (but not INTEGER PRIMARY KEY DESC) it'll also be this value. See: http://www.sqlite.org/lang_createtable.html#rowid Peter On 2/10/2013 5:23 PM, roystonja...@comcast.net wrote:

[sqlite] How to get the RecNo ???

2013-02-10 Thread roystonjames
After you do a retrieve from the database, how would to access the RecNo for each record? I can get to all the fields but I don't know how to access the record number that sqlite creates when it creates your record. I am not looking for the last record number created. I will be populating a

Re: [sqlite] Deletion slow?

2013-02-10 Thread Jason Gauthier
>Ah, I did not understand this. I ran three tests after enabling this: >root@raspberrypi:/opt/obdpi/sql# sqlite3 trip.db 'PRAGMA journal_mode=WAL' >wal ># time sqlite3 trip.db "delete from trip where key<=200" >real0m0.642s [edited] Sqlite4 >time /root/sqlite4/sqlite4 trip.db "delete

Re: [sqlite] "default value of column [name] is not constant." error in table creation when using double quoted string literal in parenthesis

2013-02-10 Thread Richard Hipp
On Sun, Feb 10, 2013 at 5:27 PM, Simon Slavin wrote: > > On 10 Feb 2013, at 8:39pm, Richard Hipp wrote: > > > The fact that SQLite will treat a double-quoted string as a string > literal > > rather than as a quoted identifier is a horrible mis-feature. It

Re: [sqlite] "default value of column [name] is not constant." error in table creation when using double quoted string literal in parenthesis

2013-02-10 Thread Simon Slavin
On 10 Feb 2013, at 8:39pm, Richard Hipp wrote: > The fact that SQLite will treat a double-quoted string as a string literal > rather than as a quoted identifier is a horrible mis-feature. It was added > 10 years or so ago in an attempt to be more MySQL-compatible. I have come

Re: [sqlite] "default value of column [name] is not constant." error in table creation when using double quoted string literal in parenthesis

2013-02-10 Thread Bogdan Ureche
Hi Richard, Thank you for taking the time to reply. Personally I never use double-quoted strings as string literals, but this issue was reported by users of a tool that generates table creation SQL based on user input, and that encloses in parenthesis any default values entered by the user to

Re: [sqlite] "default value of column [name] is not constant." error in table creation when using double quoted string literal in parenthesis

2013-02-10 Thread Richard Hipp
The fact that SQLite will treat a double-quoted string as a string literal rather than as a quoted identifier is a horrible mis-feature. It was added 10 years or so ago in an attempt to be more MySQL-compatible. I have come to sorely regret that change. I'd love to get rid of this mis-feature,

Re: [sqlite] match on single column but with multiple value

2013-02-10 Thread e-mail mgbg25171
That's great Mike. Thanks very much! On 10 February 2013 20:26, Mike King wrote: > Select * from tbl where col1 in ('a', 'b', 'c') > > > > On Sunday, 10 February 2013, e-mail mgbg25171 wrote: > > > Sorry if this is a very basic question but I'm just wondering if there's >

Re: [sqlite] match on single column but with multiple value

2013-02-10 Thread Mike King
Select * from tbl where col1 in ('a', 'b', 'c') On Sunday, 10 February 2013, e-mail mgbg25171 wrote: > Sorry if this is a very basic question but I'm just wondering if there's a > more elegant way of doing this > > select * from tbl where col1 = 'a' or col1 = 'b' or col1 = 'c' > > i.e.

Re: [sqlite] Sqlite and AS400

2013-02-10 Thread Mauro Bertoli
>> Hi all, I'm a new user in this list. Is possible to connect >> to a SQLITE database from AS400? Any help will be appreciated. >> Mauro > >There appears to be a sqlite3 port to AS400 >embedded in "iSeries Python". >

[sqlite] match on single column but with multiple value

2013-02-10 Thread e-mail mgbg25171
Sorry if this is a very basic question but I'm just wondering if there's a more elegant way of doing this select * from tbl where col1 = 'a' or col1 = 'b' or col1 = 'c' i.e. selecting rows if a particular column has one of SEVERAL values. Any help much appreciated.

Re: [sqlite] To import csv file in C#

2013-02-10 Thread Brad Hards
On 09/02/13 13:49, mukesh kumar mehta wrote: Is there any option to import csv file into sqlite database with the help of System.Data.Sqlite.dll. As like shell command ".import file_name table_name". SpatiaLite can do this (either as a virtual table, or an import). There are probably other

Re: [sqlite] Sqlite and AS400

2013-02-10 Thread Kees Nuyt
On Sun, 10 Feb 2013 18:42:08 + (GMT), Mauro Bertoli wrote: > Hi all, I'm a new user in this list. Is possible to connect > to a SQLITE database from AS400? Any help will be appreciated. > Mauro There appears to be a sqlite3 port to AS400 embedded in "iSeries

[sqlite] "default value of column [name] is not constant." error in table creation when using double quoted string literal in parenthesis

2013-02-10 Thread Bogdan Ureche
Using SQLite 3.7.15.2. The following statements execute with no error: CREATE TABLE [test1] ( [id] INTEGER, [name] CHAR DEFAULT 'test'); CREATE TABLE [test2] ( [id] INTEGER, [name] CHAR DEFAULT ('test')); CREATE TABLE [test3] ( [id] INTEGER, [name] CHAR DEFAULT "test"); However,

Re: [sqlite] random, infrequent disk I/O errors

2013-02-10 Thread Patrik Nilsson
Hello, This letter is a help getting you started to finding your error. There are many SQLITE_IOERR-errors, for example SQLITE_IOERR_NOMEM which means out of memory. I have noticed in my application that I sometimes get out of memory when calling g_string_new() after modifying the whole table,

[sqlite] Sqlite and AS400

2013-02-10 Thread Mauro Bertoli
Hi all, I'm a new user in this list. Is possible to connect to a SQLITE database from AS400? Any help will be appreciated. Mauro ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] random, infrequent disk I/O errors

2013-02-10 Thread Dominique Pellé
Greg Janée wrote: > Hello, I'm running a web service that uses SQLite that throws a disk I/O > exception every once in a while, meaning once every few weeks. ...snip... > Any ideas? Unfortunately, the (standard) Python SQLite wrapper I'm using > doesn't provide access to any more information (if

Re: [sqlite] random, infrequent disk I/O errors

2013-02-10 Thread Simon Slavin
On 10 Feb 2013, at 4:28pm, Greg Janée wrote: > Any ideas? Unfortunately, the (standard) Python SQLite wrapper I'm using > doesn't provide access to any more information (if there is any to be had). That would make diagnosis difficult. Please check to see whether you can