[sqlite] Two Requests for System.Data.SQLite

2011-06-01 Thread Patrick Earl
1. Please release a zipped version of the x86 and x64 binaries so we don't have to install the package, copy the files, then uninstall it. 2. Please release a version built against .NET 4 so the legacy runtime flag can be avoided. Thanks for considering these things. They would certainly make

Re: [sqlite] Bug in sqlite3_bind_parameter_name

2011-06-01 Thread Patrick Earl
That's awesome. Thanks so much. :) ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Bug in sqlite3_bind_parameter_name

2011-06-01 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/01/2011 06:42 PM, Patrick Earl wrote: > So, to move forward on this bug a decision needs to be made at what > level it will be handled. > > 1. At the SQLite level. That is exactly what the team did. See the timeline:

Re: [sqlite] Bug in sqlite3_bind_parameter_name

2011-06-01 Thread Patrick Earl
So, to move forward on this bug a decision needs to be made at what level it will be handled. 1. At the SQLite level. 2. At the provider level (ex. System.Data.SQLite, Python providers, etc.) 3. At the user level (ex. NHibernate, Entity Framework, User Applications, etc.) Doing it in #3 would

Re: [sqlite] Create DB file and then Create Table - Table FAILS.

2011-06-01 Thread Simon Slavin
On 2 Jun 2011, at 1:06am, Don Ireland wrote: > Using Visual Studio C++, the following code DOES create the DB file. > But the table doesn't get created and I'm stumped as to why it won't > create the table. Aren't you meant to do something like SQLiteCommand SQLiteCommand = new

[sqlite] Create DB file and then Create Table - Table FAILS.

2011-06-01 Thread Don Ireland
I'm hoping someone can help me with this. Using Visual Studio C++, the following code DOES create the DB file. But the table doesn't get created and I'm stumped as to why it won't create the table. SQLiteConnection conn; conn.ConnectionString = "Data

Re: [sqlite] Trigger help needed

2011-06-01 Thread Jim Mellander
Thanks - and with a little reading of the manpages, understandable too Appreciate it. On Wed, Jun 1, 2011 at 2:34 PM, Igor Tandetnik wrote: > On 6/1/2011 5:23 PM, Jim Mellander wrote: >> I appreciate the help - I'm new at using triggers.  What I want to >> accomplish

Re: [sqlite] Trigger help needed

2011-06-01 Thread Igor Tandetnik
On 6/1/2011 5:23 PM, Jim Mellander wrote: > I appreciate the help - I'm new at using triggers. What I want to > accomplish is: > > 1. insert if the ip isn't already in the database > 2. update the timestamp if the new timestamp after the current > timestamp in the database Something like this,

Re: [sqlite] Trigger help needed

2011-06-01 Thread Jim Mellander
I appreciate the help - I'm new at using triggers. What I want to accomplish is: 1. insert if the ip isn't already in the database 2. update the timestamp if the new timestamp after the current timestamp in the database what would be the proper trigger to accomplish this task? Thanks in

Re: [sqlite] Trigger help needed

2011-06-01 Thread Igor Tandetnik
On 6/1/2011 3:31 PM, Jim Mellander wrote: > CREATE TABLE ip_timestamps (ip text unique, timestamp date); > CREATE UNIQUE INDEX ip_index on ip_timestamps (ip ASC); > CREATE TRIGGER ts_update after update on ip_timestamps when > NEW.timestamp< OLD.timestamp BEGIN update ip_timestamps set timestamp

Re: [sqlite] Trigger help needed

2011-06-01 Thread Pavel Ivanov
> CREATE TRIGGER ts_update after update on ip_timestamps when This means that your trigger fires after each UPDATE statement. But > I'm adding/updating records with statements like: > > INSERT OR REPLACE into ip_timestamps VALUES ( "182.71.33.222" , 1306932777 ); you do INSERT statements, so

Re: [sqlite] Big difference in performance between Python and gcc

2011-06-01 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/01/2011 12:25 PM, Dominique Pellé wrote: > [Various optimisations] While those are all valid, they don't address the underlying issue which is C code taking five times longer than Python code for the same SQLite operations. In addition that

Re: [sqlite] Trigger help needed

2011-06-01 Thread Michael Stephenson
NEW.timestamp < OLD.timestamp (less than)? -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Jim Mellander Sent: Wednesday, June 01, 2011 3:31 PM To: General Discussion of SQLite Database Subject: [sqlite] Trigger help needed

[sqlite] Trigger help needed

2011-06-01 Thread Jim Mellander
Hopefully someone can help me with this I have a table with IP addresses and timestamps - I want to update the table when the new timestamp is later than the old one $ sqlite3 test.db SQLite version 3.7.4 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> .schema

Re: [sqlite] Big difference in performance between Python and gcc

2011-06-01 Thread Dominique Pellé
Alessandro Marzocchi wrote: > Hello, >    I made some preliminary tests for an application storing big > chunks of data in a sqlite database. I did firsts tests with python > and they gave me quite impressive results. I then tried to make the > same test using C. I expected to get execution times

Re: [sqlite] TRANSACTIONs

2011-06-01 Thread Simon Slavin
On 1 Jun 2011, at 7:57pm, Robert Myers wrote: > What about the I of ACID? The select should have an implicit transaction > around it. That would violate the SQL standard which says you can SELECT data which you haven't committed yet. Actually the bit of ACID you want for SELECT is really the

Re: [sqlite] Error (LOCKFILE_EXCLUSIVE_LOCK) at building sqlite project for pocket pc

2011-06-01 Thread hmas
Thank you for your answer. Actually, I managed to make it work by selecting "Windows Mobile 5.0 Pocket PC SDK" instead of "Pocket PC 2003" for the SDK in the procedure described in my first post. All the best, -- hmas -- View this message in context:

Re: [sqlite] TRANSACTIONs

2011-06-01 Thread Pavel Ivanov
> What about the I of ACID? The select should have an implicit transaction > around it. No, it shouldn't. It can be a part of some other transaction. I in ACID means Isolation of transactions, not Isolation of select statements. Otherwise there would be no way for select statement to read

Re: [sqlite] TRANSACTIONs

2011-06-01 Thread Robert Myers
On 6/1/2011 1:47 PM, Pavel Ivanov wrote: >> Actually, you do know what SQLite does without knowing the internals. It >> claims to be serializable and ACID >> (http://www.sqlite.org/transactional.html), therefore it's fine. > "Serializable" there means that once transaction is started statements >

Re: [sqlite] TRANSACTIONs

2011-06-01 Thread Pavel Ivanov
> Actually, you do know what SQLite does without knowing the internals. It > claims to be serializable and ACID > (http://www.sqlite.org/transactional.html), therefore it's fine. "Serializable" there means that once transaction is started statements won't see any data committed in other

Re: [sqlite] TRANSACTIONs

2011-06-01 Thread Robert Myers
On 6/1/2011 1:23 PM, Simon Slavin wrote: > On 1 Jun 2011, at 7:12pm, Jan Hudec wrote: > >> On Wed, Jun 01, 2011 at 10:17:02 -0400, Pavel Ivanov wrote: From within a BEGIN TRANSACTION and END TRANSACTION block, should I not update the same row in a table more than once? >>> You can

Re: [sqlite] What is so slow on dropping tables?

2011-06-01 Thread Nico Williams
On Jun 1, 2011 1:46 PM, "Jan Hudec" wrote: > On Tue, May 31, 2011 at 16:44:13 -0500, Nico Williams wrote: > > On Tue, May 31, 2011 at 4:22 PM, Simon Slavin wrote: > > > Split the DROP into two stages: > > > > > > DELETE FROM myTable; > > > DROP TABLE myTable; >

Re: [sqlite] TRANSACTIONs

2011-06-01 Thread Simon Slavin
On 1 Jun 2011, at 7:12pm, Jan Hudec wrote: > On Wed, Jun 01, 2011 at 10:17:02 -0400, Pavel Ivanov wrote: >>> From within a BEGIN TRANSACTION and END TRANSACTION block, should I not >>> update the same row in a table more than once? >> >> You can update it as many times as you need. >> >>>

Re: [sqlite] Error (LOCKFILE_EXCLUSIVE_LOCK) at building sqlite project for pocket pc

2011-06-01 Thread Jan Hudec
On Wed, Jun 01, 2011 at 09:13:30 -0700, hmas wrote: > Here is what I've read: > = > FYI, Compiling for Pocket PC 2003 stopped to work since version 3.7.1 > and 3.7.2. So using 3.6.23.1 for now until it gets fixed. >

Re: [sqlite] TRANSACTIONs

2011-06-01 Thread Jan Hudec
On Wed, Jun 01, 2011 at 10:17:02 -0400, Pavel Ivanov wrote: > >  From within a BEGIN TRANSACTION and END TRANSACTION block, should I not > > update the same row in a table more than once? > > You can update it as many times as you need. > > > What are the exact limitations on what I can do

Re: [sqlite] Big difference in performance between Python and gcc

2011-06-01 Thread Jan Hudec
On Wed, Jun 01, 2011 at 09:25:04 +0200, Alessandro Marzocchi wrote: > However I was surprised as the performance got a lot > worse, with execution times being more than 3 times more. I tried > everything I could think of and also peeked at python module's source > but i couldn't find any way to

Re: [sqlite] Create DB file and then Create Table - Table FAILS.

2011-06-01 Thread Jan Hudec
On Wed, Jun 01, 2011 at 12:21:15 -0400, Richard Hipp wrote: > On Wed, Jun 1, 2011 at 12:19 PM, Stephan Beal wrote: > > > On Wed, Jun 1, 2011 at 5:18 AM, Don Ireland wrote: > > > > > GenBookMRU_3 TEXT, GenBookMRU_4 TEXT); > > > > > > > i might be

Re: [sqlite] What is so slow on dropping tables?

2011-06-01 Thread Jan Hudec
On Tue, May 31, 2011 at 16:44:13 -0500, Nico Williams wrote: > On Tue, May 31, 2011 at 4:22 PM, Simon Slavin wrote: > > Split the DROP into two stages: > > > > DELETE FROM myTable; > > DROP TABLE myTable; > > > > Which one takes all the time ?  If it's the second one, then

Re: [sqlite] Syncing databases on different servers

2011-06-01 Thread Alexey Pechnikov
See undo extension: http://sqlite.mobigroup.ru/artifact/265e408b4352d66cfc79a9990cb2c22fb390d3b6 http://sqlite.mobigroup.ru/artifact/2250bbbc83f80eff73ce003ab7a30293c688ae9b And history extension: http://sqlite.mobigroup.ru/artifact/0b8eaab9564575fcf37f459bb85c501f65089b31

[sqlite] Support for .Net CE 3.5

2011-06-01 Thread Jeff Hoffman
I am programming for Windows Mobile 6.5.3 and would like to use SQLite. I see this message on the "Features" page: Supports the Full and Compact .NET Framework, and native C/C++ development. 100% binary compatible with the original sqlite3.dll. Compact framework not currently not included. We

Re: [sqlite] Bug in sqlite3_bind_parameter_name

2011-06-01 Thread Stephan Beal
On Wed, Jun 1, 2011 at 6:24 PM, Patrick Earl wrote: > From these, the "best" solution seems to be re-tokenizing the sql in > the provider. Is there another work-around? It seems that > implementing this at the database level would be the most efficient > approach.

Re: [sqlite] Bug in sqlite3_bind_parameter_name

2011-06-01 Thread Patrick Earl
On Wed, Jun 1, 2011 at 12:32 AM, Roger Binns wrote: > It does seem to me that this specific example is "wrong".  Selects return > zero or more rows yet the equality wants exactly one value.  I would expect > an error rather an implied "LIMIT 1" should there be anything

Re: [sqlite] Create DB file and then Create Table - Table FAILS.

2011-06-01 Thread Richard Hipp
On Wed, Jun 1, 2011 at 12:19 PM, Stephan Beal wrote: > On Wed, Jun 1, 2011 at 5:18 AM, Don Ireland wrote: > > > GenBookMRU_3 TEXT, GenBookMRU_4 TEXT); > > > > i might be very wrong here, but i SEEM to remember that having a semicolon > on the end of

Re: [sqlite] Create DB file and then Create Table - Table FAILS.

2011-06-01 Thread Stephan Beal
On Wed, Jun 1, 2011 at 5:18 AM, Don Ireland wrote: > GenBookMRU_3 TEXT, GenBookMRU_4 TEXT); > i might be very wrong here, but i SEEM to remember that having a semicolon on the end of a line sent to sqlite3_exec() (or similar) doesn't work. i might, however, be

Re: [sqlite] Create DB file and then Create Table - Table FAILS.

2011-06-01 Thread Kevin Benson
Check to see if escaping combined with double quotes works for you: SQLiteConnection conn; conn.ConnectionString = "Data Source=D:\Users\Don\Downloads\CashBoxPrefs.dat"; conn.Open(); SQLiteCommand sqlCmd(%conn); sqlCmd.CommandText = "CREATE TABLE IF NOT EXISTS Prefs (\"SyncEnabled\" bool ,

Re: [sqlite] Error (LOCKFILE_EXCLUSIVE_LOCK) at building sqlite project for pocket pc

2011-06-01 Thread hmas
Me again... Here is what I've read: = FYI, Compiling for Pocket PC 2003 stopped to work since version 3.7.1 and 3.7.2. So using 3.6.23.1 for now until it gets fixed. =

Re: [sqlite] Syncing databases on different servers

2011-06-01 Thread Gary_Gabriel
Hi Ian, > I do not need instant syncing of SQLite databases, however I do have > a table stored on server X which I would like to gradually send > changes of to various other servers connected by TCP. > > In the first instance, I'd be quite happy to send rows with ids which > do not exist in

[sqlite] Error (LOCKFILE_EXCLUSIVE_LOCK) at building sqlite project for pocket pc

2011-06-01 Thread hmas
Hi, Thank you for reading my post. I have downloaded the following archive: http://www.sqlite.org/sqlite-amalgamation-3070603.zip It contains: - shell.c - sqlite3.c - sqlite3.h - sqlite3ext.h My OS is "Windows Vista". With "Microsoft Visual Studio 2005 Version 8.0", I created a new "Project":

Re: [sqlite] TRANSACTIONs

2011-06-01 Thread Pavel Ivanov
>  From within a BEGIN TRANSACTION and END TRANSACTION block, should I not > update the same row in a table more than once? You can update it as many times as you need. > What are the exact limitations on what I can do during a Transaction? Do not update a table if there is some select

[sqlite] TRANSACTIONs

2011-06-01 Thread Ian Hardingham
Hey guys, thanks for all the help so far today. From within a BEGIN TRANSACTION and END TRANSACTION block, should I not update the same row in a table more than once? What are the exact limitations on what I can do during a Transaction? Thanks, Ian

Re: [sqlite] Syncing databases on different servers

2011-06-01 Thread Alexey Pechnikov
See http://sqlite.mobigroup.ru/wiki?name=sqlite3-rdiff 2011/6/1 Ian Hardingham : > Hey guys, > > First of all, I'm aware that SQLite is not a good choice for concurrency > over several machines. > > I do not need instant syncing of SQLite databases, however I do have a > table

Re: [sqlite] Create DB file and then Create Table - Table FAILS.

2011-06-01 Thread Michael Stephenson
I don't see anywhere a "sqlCmd.Execute()" or whatever the method is to execute the command. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Don Ireland Sent: Tuesday, May 31, 2011 11:21 PM To: General Discussion of SQLite

Re: [sqlite] Syncing databases on different servers

2011-06-01 Thread Igor Tandetnik
Ian Hardingham wrote: > I do not need instant syncing of SQLite databases, however I do have a > table stored on server X which I would like to gradually send changes of > to various other servers connected by TCP. Perhaps you could use something like rsync to synchronize at the

Re: [sqlite] Biggest number in an INTEGER field

2011-06-01 Thread Nick Shaw
> Guys, an an SQLite3 INTEGER field what is the maximum number that fits in an INTEGER PRIMARY KEY field? According to http://www.sqlite.org/faq.html#q1, it is 9223372036854775807. Thanks, Nick. ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] Biggest number in an INTEGER field

2011-06-01 Thread Ian Hardingham
Guys, an an SQLite3 INTEGER field what is the maximum number that fits in an INTEGER PRIMARY KEY field? Thanks, Ian ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Substring (LIKE "%key%") searches, would FTS3 with suffix-tree tokenizer be the fast way?

2011-06-01 Thread Fedor Tyurin
Were you able to solve the problem? What solution have to chosen? BR, Fedor I'd appreciate any suggestions on good ways to do this, I'm neither an SQL or sqlite expert, so I might be thinking about it all wrong. I have something like a (read-only) address book/rolodex, with interactive

Re: [sqlite] What is so slow on dropping tables?

2011-06-01 Thread Dan Kennedy
On 06/01/2011 02:18 AM, Jan Hudec wrote: > Hellow folks, > > At $work we have an application that processes *huge* (tens of millions of > rows in some of the larger tables, sometimes over 30GiB file size). This > application changes and when it does, it drops some tables and calculates > them

Re: [sqlite] FTS4 reserved characters

2011-06-01 Thread Dan Kennedy
On 06/01/2011 06:30 AM, Mohd Radzi Ibrahim wrote: > Hi, > I was searching for any reference to reserved characters used in FTS4, but > failed to find any. > > I have problem with query with - ftstable match 'width 5" ' > > But it's ok with - ftstable match 'width 5' > > to fix this, I replaces

[sqlite] Big difference in performance between Python and gcc

2011-06-01 Thread Alessandro Marzocchi
Hi Roger, thank for your answer. I tried to modify programs to match your suggestion, performances improved but are still far from pyhon's ones. (Sorry if this message starts a different thread but i had forwards of single messages disabled so i could not reply to the original post) C

Re: [sqlite] What is so slow on dropping tables?

2011-06-01 Thread Jean-Christophe Deschamps
>Quoth Roger Binns , on 2011-06-01 00:21:44 -0700: > > On 05/31/2011 12:18 PM, Jan Hudec wrote: > > > - Is there any way to speed it up? > > > > Another way (somewhat hinted at by Nico) is that you can create > these tables > > in separate databases and use attach to

Re: [sqlite] What is so slow on dropping tables?

2011-06-01 Thread Drake Wilson
Quoth Roger Binns , on 2011-06-01 00:21:44 -0700: > On 05/31/2011 12:18 PM, Jan Hudec wrote: > > - Is there any way to speed it up? > > Another way (somewhat hinted at by Nico) is that you can create these tables > in separate databases and use attach to bring them in.

Re: [sqlite] Big difference in performance between Python and gcc

2011-06-01 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/01/2011 12:25 AM, Alessandro Marzocchi wrote: > The only thing that this program does > is creating a database, making a table where a pair of integer maps > 8192-bytes blobs and writing 100k rows in it. Any suggestions of what > I could be

[sqlite] Big difference in performance between Python and gcc

2011-06-01 Thread Alessandro Marzocchi
Hello, I made some preliminary tests for an application storing big chunks of data in a sqlite database. I did firsts tests with python and they gave me quite impressive results. I then tried to make the same test using C. I expected to get execution times to be the same of those of python.

Re: [sqlite] What is so slow on dropping tables?

2011-06-01 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/31/2011 12:18 PM, Jan Hudec wrote: > - Is there any way to speed it up? Another way (somewhat hinted at by Nico) is that you can create these tables in separate databases and use attach to bring them in. To drop a table you can just detach

Re: [sqlite] Bug in sqlite3_bind_parameter_name

2011-06-01 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 >> It's been that way for 6 years, and nobody has noticed until Patrick >> complained earlier today. Schrödinbug - http://en.wikipedia.org/wiki/Unusual_software_bug#Schr.C3.B6dinbug >> Hence, the fix is a little trickier than it might seem at first