Re: [sqlite] Implementing busy-waiting on SQLite

2011-06-13 Thread Jay A. Kreibich
On Mon, Jun 13, 2011 at 06:21:10PM +0200, Jean-Christophe Deschamps scratched on the wall: > Hi Jay, > > >> Invoke sqlite3_busy_timeout() with a safe timeout for every connection > >> to the DB. > >> Use IMMEDIATE transactions everywhere. > >> > >> That's all you have to do. > > > > Well, yes

Re: [sqlite] A simple SELECT

2011-06-13 Thread Moi (Ph RIO Biz)
I made changes with an other sqlite editor and now it works fine. It was not a code problem. Thanks for your help Philippe RIO -Message d'origine- From: Black, Michael (IS) Sent: Monday, June 13, 2011 7:56 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] A simple

Re: [sqlite] A simple SELECT

2011-06-13 Thread Moi (Ph RIO Biz)
The result always is the same : NONE -Message d'origine- From: Black, Michael (IS) Sent: Monday, June 13, 2011 7:56 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] A simple SELECT Try changing just the last char. Then drop just the last char. Michael D. Black

Re: [sqlite] A simple SELECT

2011-06-13 Thread Black, Michael (IS)
Try changing just the last char. Then drop just the last char. Michael D. Black Senior Scientist NG Information Systems Advanced Analytics Directorate From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Moi (Ph RIO Biz)

Re: [sqlite] EXT :Re: A simple SELECT

2011-06-13 Thread Moi (Ph RIO Biz)
For example "Test" -Message d'origine- From: Black, Michael (IS) Sent: Monday, June 13, 2011 7:30 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] EXT :Re: A simple SELECT If you change the table name to what? Same # of chars? Michael D. Black Senior Scientist NG

[sqlite] How to compile both DLLs with another .NET framework

2011-06-13 Thread Cyrille
Dear all, Following Pavel's answers to my topic "Cannot load SQLite.Interop.dll but file is in the folder" (cf. below), it seems necessary for me to re-compile both DLLs (System.Data.SQLite.dll and SQLite.Interop.dll) with a specific framework version (my application uses the framework 3.0).

Re: [sqlite] EXT :Re: A simple SELECT

2011-06-13 Thread Black, Michael (IS)
If you change the table name to what? Same # of chars? Michael D. Black Senior Scientist NG Information Systems Advanced Analytics Directorate From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Moi (Ph RIO Biz)

Re: [sqlite] A simple SELECT

2011-06-13 Thread Moi (Ph RIO Biz)
If I change the table name it works. I tryed the same query using SqLite3Explorer and it does not give any result ! -Message d'origine- From: Black, Michael (IS) Sent: Monday, June 13, 2011 6:45 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] A simple SELECT

Re: [sqlite] A simple SELECT

2011-06-13 Thread Moi (Ph RIO Biz)
Records are inserted using SqLiteExpertPro. The program only read datas. These tables have one index for the text and an other for the language, like this I have a record for French language (mine) and an other for english language. Many languages can be added like this. Here is the table

Re: [sqlite] A simple SELECT

2011-06-13 Thread Black, Michael (IS)
Oops...sorry...you're correct...been far too long since I've done assembler. Are we to understand that if you simply give this table a different name it works? That seems to be what you said in your initial email. Are you inserting records in the table in your assembler too? Are you

Re: [sqlite] A simple SELECT

2011-06-13 Thread Moi (Ph RIO Biz)
Already made ! -Message d'origine- From: Simon Slavin Sent: Monday, June 13, 2011 6:39 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] A simple SELECT On 13 Jun 2011, at 5:36pm, Moi (Ph RIO Biz) wrote: > The second parameter is used when there is a syntax error,

Re: [sqlite] A simple SELECT

2011-06-13 Thread Simon Slavin
On 13 Jun 2011, at 5:36pm, Moi (Ph RIO Biz) wrote: > The second parameter is used when there is a syntax error, this a pointer of > the starting error text. > I used SqLiteExplorer to read my table and it does not retrieve any data, > only SqLiteExpert can ! This is why its name is "EXPERT" !

Re: [sqlite] A simple SELECT

2011-06-13 Thread Moi (Ph RIO Biz)
The second parameter is used when there is a syntax error, this a pointer of the starting error text. I used SqLiteExplorer to read my table and it does not retrieve any data, only SqLiteExpert can ! This is why its name is "EXPERT" ! This is not a code problem, there is a problem into the

Re: [sqlite] A simple SELECT

2011-06-13 Thread Bogdan Ureche
I think this line is correct as it is: INVOKE sqlite3_prepare_v2,__hSql,__lpszQuery,-1,eax,edx The second parameter is __lpszQuery (the text of the query UTF-8 encoded). The statement handle is returned at the address stored in eax and is subsequently used when calling sqlite3_step. Bogdan

Re: [sqlite] Implementing busy-waiting on SQLite

2011-06-13 Thread Jean-Christophe Deschamps
Hi Jay, > > Invoke sqlite3_busy_timeout() with a safe timeout for every connection > > to the DB. > > Use IMMEDIATE transactions everywhere. > > > > That's all you have to do. > > Well, yes and no. You still have to deal with the case of > SQLITE_BUSY being returned due to deadlocks.

[sqlite] Version 1.0.73.0

2011-06-13 Thread Harry Green
I'm a new user trying *sqlite-dotnet-x86-1007300.exe* at http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki According to SQLite.NET Class Library Documentation bundled with the download and the section "*Installing SQLite Visual Studio Design-Time Support*" I should begin

Re: [sqlite] Implementing busy-waiting on SQLite

2011-06-13 Thread Jay A. Kreibich
On Mon, Jun 13, 2011 at 12:40:14PM +0200, Jean-Christophe Deschamps scratched on the wall: > > >As was being discussed yesterday, I have four processes accessing the > >same database file. When they perform an sqlite action, I wish them to > >block if the DB is not available. SQLite does not

Re: [sqlite] A simple SELECT

2011-06-13 Thread Black, Michael (IS)
You do this: INVOKE sqlite3_prepare_v2,__hSql,__lpszQuery,-1,eax,edx Then this: INVOKE sqlite3_step,_lpSQLStatment You probably want INVOKE sqlite3_prepare_v2,__hSql,__lpSQLStatement,-1,eax,edx At least from what I tell of your logic. You're not using the same variable fo the statement

Re: [sqlite] Tcl: $ and @

2011-06-13 Thread Richard Hipp
On Mon, Jun 13, 2011 at 10:33 AM, Edward Brekelbaum wrote: > > package require sqlite3 > sqlite db test.db > db eval {CREATE TABLE t1(x, data) } > db eval {INSERT INTO t1 VALUES('0', 'cheese')} > db eval {INSERT INTO t1 VALUES('four', 'bread')} > > set x 0 > db eval {SELECT *

Re: [sqlite] ATTACH DATABASE .tables .schema ?

2011-06-13 Thread Jay A. Kreibich
On Sun, Jun 12, 2011 at 05:29:32PM -0400, ap scratched on the wall: > When I attach additional DB's with ATTACH DATABASE how can I view the schema > or tables in the (non main) databases? > > > > ATTACH DATABASE 'C:\temp\test.db' AS T > > .schema T > > .tables T > > Produce no results.

Re: [sqlite] [sqlite-dev] Is there an option to not lock during transaction?

2011-06-13 Thread Pavel Ivanov
> Hmm... unless read_uncommited is persistant somehow; looks like if I > just don't try to use shared cache it works... I thought I had > disabled cache before alone and still got the same results... read_uncommitted works only when shared_cache is on. To answer your original question: if you

Re: [sqlite] Tcl: $ and @

2011-06-13 Thread Edward Brekelbaum
Hello, Sorry this took some time to create a test case for... - Original Message > From: Richard Hipp > Sent: Wed, June 8, 2011 7:14:40 AM > Subject: Re: [sqlite] Tcl: $ and @ > > On Wed, Jun 8, 2011 at 6:37 AM, Edward Brekelbaum wrote: >>

Re: [sqlite] A simple SELECT

2011-06-13 Thread Moi (Ph RIO Biz)
I copied your SqLite3 dll to my program folder and get the same result, that means none. I changed SqLiteExpert to use external library and the query gives the expected result. That means this is not a SqLite bug (I would be suprised to find one), but my assembler code is ok. Could it be a

Re: [sqlite] A simple SELECT

2011-06-13 Thread Moi (Ph RIO Biz)
Thanks for your help. The assembler code and the debugging session is on the forum at http://sqliteexpert.com/forum/YaBB.pl?num=1307955468/0 I don't get any data, but just with one table. If I change the table name into the same query, I get a result. I am looking if I can change SqLiteExpert

Re: [sqlite] A simple SELECT

2011-06-13 Thread Bogdan Ureche
Sorry, please disregard my previous message. It seems I experienced a page refresh issue and I didn't see your full message on the forum. Bogdan On Mon, Jun 13, 2011 at 9:16 AM, Bogdan Ureche wrote: > > > On Mon, Jun 13, 2011 at 8:44 AM, Moi (Ph RIO Biz)

Re: [sqlite] A simple SELECT

2011-06-13 Thread Bogdan Ureche
On Mon, Jun 13, 2011 at 8:44 AM, Moi (Ph RIO Biz) wrote: > You are right, I corrected it but this is not the problem. > The problem is coming from only ONE table : LibLogInf. > I exported it, destroyed it, re-created it and re-entered the datas the > problem always exists ! >

Re: [sqlite] A simple SELECT

2011-06-13 Thread Moi (Ph RIO Biz)
You are right, I corrected it but this is not the problem. The problem is coming from only ONE table : LibLogInf. I exported it, destroyed it, re-created it and re-entered the datas the problem always exists ! If I made the same query with just changing the table name there is no problem !

Re: [sqlite] A simple SELECT

2011-06-13 Thread Bogdan Ureche
Hello Philippe, My assembler is a bit rusty, but it looks like you perform the jump to @ReadyToGetData when the return code is either SQLITE_ROW or SQLITE_DONE. You should only attempt to get the data when the return code is SQLITE_ROW. Bogdan On Mon, Jun 13, 2011 at 2:47 AM, Moi (Ph RIO Biz)

[sqlite] Patch for fts3_tokenizer.c to compile FTS3 extension as a loadable module

2011-06-13 Thread Alexey Pechnikov
In fts3_tokenizer.c these lines are invalid: #include "sqlite3ext.h" #ifndef SQLITE_CORE SQLITE_EXTENSION_INIT1 #endif Use single line instead: #include "sqlite3.h" -- Best regards, Alexey Pechnikov. http://pechnikov.tel/ ___ sqlite-users mailing

Re: [sqlite] To index or not to index?

2011-06-13 Thread Black, Michael (IS)
Ummm...wouldn't it be a whole lot simpler and faster to have an "Online" table? One id is all that's needed unless you want other info. Then you're just inserting and deleting records and the whole table is "online" at any moment. I don't see any reason why this online status needs to be

Re: [sqlite] To index or not to index?

2011-06-13 Thread Timothy Legge
On Mon, Jun 13, 2011 at 8:46 AM, Richard Hipp wrote: > That depends on what fraction of entries have isOnline=1.  If isOnline is > rare, then an index might be helpful.  But if roughly have the entires have I wondered about that. > It seems to me, though, that you are

Re: [sqlite] To index or not to index?

2011-06-13 Thread Richard Hipp
On Mon, Jun 13, 2011 at 6:51 AM, Ian Hardingham wrote: > Hey guys, once again sorry for spamming at the moment. > > This is a simple question. > > My user account table has a field "isOnline INT". This table has, say, > 100,000 rows. > > Every ten seconds I need to compile a

Re: [sqlite] To index or not to index?

2011-06-13 Thread Timothy Legge
On Mon, Jun 13, 2011 at 7:51 AM, Ian Hardingham wrote: > Hey guys, once again sorry for spamming at the moment. > > This is a simple question. > > My user account table has a field "isOnline INT".  This table has, say, > 100,000 rows. My understanding is that if the number of

[sqlite] To index or not to index?

2011-06-13 Thread Ian Hardingham
Hey guys, once again sorry for spamming at the moment. This is a simple question. My user account table has a field "isOnline INT". This table has, say, 100,000 rows. Every ten seconds I need to compile a list of all users where isOnline is 1. However, people log in and out at a rate of

[sqlite] ATTACH DATABASE .tables .schema ?

2011-06-13 Thread ap
When I attach additional DB's with ATTACH DATABASE how can I view the schema or tables in the (non main) databases? ATTACH DATABASE 'C:\temp\test.db' AS T .schema T .tables T Produce no results. Thanks. ___ sqlite-users mailing list

Re: [sqlite] [sqlite-dev] Is there an option to not lock during transaction?

2011-06-13 Thread J Decker
If I disable enable_shared_cache then there is a pragme read_uncommitted that doesn't generate the locks; so non shared, read_uncommited combination works; I tried 'PRAGMA journal_mode=WAL' which says it returns a string; I assume that if I treat it as a query and sqlite3_step I should get back

Re: [sqlite] Store result of calculation or not

2011-06-13 Thread Ian Hardingham
Many thanks Igor. Would this index be enough: CREATE INDEX IF NOT EXISTS mtTablePlayer1 ON multiturnTable (player1,player2) Or do I need the opposite as well? CREATE INDEX IF NOT EXISTS mtTablePlayer1 ON multiturnTable (player2,player1) Why I have two queries: the order of the arguments are

[sqlite] Using the same database from four separate applications

2011-06-13 Thread Ian Hardingham
Hey guys. I believe it's fine to have four applications open the same database file and use it concurrently. I have a few questions. 1. Do I need to use any special PRAGMA or other option to use this functionality best? 2. Is it possible to (ab)use SQLite to perform as some kind of mutex?

Re: [sqlite] Implementing busy-waiting on SQLite

2011-06-13 Thread Jean-Christophe Deschamps
>As was being discussed yesterday, I have four processes accessing the >same database file. When they perform an sqlite action, I wish them to >block if the DB is not available. SQLite does not block if it finds the >db busy or locked, it returns an error code. You can have SQLite do all this

[sqlite] Implementing busy-waiting on SQLite

2011-06-13 Thread Ian Hardingham
Hey guys. As was being discussed yesterday, I have four processes accessing the same database file. When they perform an sqlite action, I wish them to block if the DB is not available. SQLite does not block if it finds the db busy or locked, it returns an error code. I plan on using

[sqlite] A simple SELECT

2011-06-13 Thread Moi (Ph RIO Biz)
I encounter a big problem with a simple query. Here is the query SELECT LTRIM(RTRIM(_Libelle)) FROM LibLogInf WHERE ((_Index = 3) AND (_Langue = 1)) When I run it from SqLiteExpertPro there is no problem and I get my result. Into my program I get a NULL pointer. The table is defined like this