Re: [sqlite] Using WAL?

2011-01-03 Thread Olaf Schmidt
"Sachin Gupta" schrieb im Newsbeitrag news:51b335651c9a0c4ea520d47f23a580b414f5baf...@sinnodmbx001.techmahindra.com... > Following are the setup details that we are presuming that our > application will be put through test: > > 1. One writer thread (To avoid multiple Writers. We don't > actu

Re: [sqlite] A kind help-request.

2011-01-03 Thread GS
Simon Slavin was thinking very hard : > On 3 Jan 2011, at 9:08pm, GS wrote: > >> Looping through the array gives me access to each record if I start the >> loop at vaDataArray(1), thus the loop parameters of '1 To >> UBound(vaDataArray)'. > > I have twice suggest you do not do this. Holding the

Re: [sqlite] A kind help-request.

2011-01-03 Thread Simon Slavin
On 3 Jan 2011, at 9:08pm, GS wrote: > Looping through the array gives me access to each record if I start the > loop at vaDataArray(1), thus the loop parameters of '1 To > UBound(vaDataArray)'. I have twice suggest you do not do this. Holding the entire data in memory at the same time will t

Re: [sqlite] A kind help-request.

2011-01-03 Thread GS
It happens that Alok Singh formulated : > Hi Garry, > > can you show me with code how You are inserting with maintaining 1st row as > to make header of table ,and next other inserting fastest way into db... > please show me your code view for that. little bit i m confuse over its > inserting proces

Re: [sqlite] Multiple instance and multithread

2011-01-03 Thread Pavel Ivanov
> Do I need to activate a specific flag (es. Multithread) when I create the > lib in order to use this multi instance configuration safety ? Multi-threading has nothing to do with multi-processing (multiple instances). SQLite always works from multiple processes (if OS permits; note: Windows is a

Re: [sqlite] A kind help-request.

2011-01-03 Thread Alok Singh
Hi Garry, can you show me with code how You are inserting with maintaining 1st row as to make header of table ,and next other inserting fastest way into db... please show me your code view for that. little bit i m confuse over its inserting process into db directly into db. mine still its slow

[sqlite] Multiple instance and multithread

2011-01-03 Thread Marco Turco
Hi all. I have some customer that are executing more instances of my windows app that use Sqlite as database, so more instances of my app works on the Sqlite database on the same time. My question: I am using the last standard Sqlite3 lib generated from the amalgamation, Do I need to activa

Re: [sqlite] A kind help-request.

2011-01-03 Thread GS
Simon Slavin wrote : > Also you are still using a 2D array to store your values. This is slow and > requires a lot of memory. Instead, use one array to read in the first row > (with the names of the columns) and then use a second 1D array for each row > of values: read one line in then write t

Re: [sqlite] Can a custom SQL function return NULL?

2011-01-03 Thread Duquette, William H (318K)
On 12/22/10 12:46 PM, "Richard Hipp" wrote: > What if the API included a function null(x) that > returns NULL if x is the "nullvalue" string specified with > [$db nullvalue], and x otherwise? > You mean the "nullif()" function? http://www.sqlite.org/lang_corefunc.html#nullif It's amazing how you

Re: [sqlite] queries inside transactions

2011-01-03 Thread Igor Tandetnik
Scott A Mintz wrote: > Thanks. I verified that by experimenting with the command-line > sqlite3.exe application. I assume the rule is: changes within a > transaction are only visible on that same connection. Until the transaction is committed, yes. That's the whole point of transaction isolati

Re: [sqlite] The underlying provider failed to open?

2011-01-03 Thread Danny Staten
?Yeah I have posted in MSDNs forums, and a forum specific to entity framework and sqlite. So far nobody has responded. I know that this mailing list hits a very wide spectrum of technologies that use sqlite, but I was hoping that some of them would be using entity framework being that in the

Re: [sqlite] queries inside transactions

2011-01-03 Thread Scott A Mintz
Thanks. I verified that by experimenting with the command-line sqlite3.exe application. I assume the rule is: changes within a transaction are only visible on that same connection. A different connection will only see changes after the transaction has been committed. -Scott sqlite-users-bou

Re: [sqlite] queries inside transactions

2011-01-03 Thread Igor Tandetnik
Scott A Mintz wrote: > If I BEGIN a transaction and perform a number of INSERTS, UPDATES, and > DELETES, then do a SELECT, will the data selected be the original > unmodified data? On the same connection within the same transaction? No, you will see the modified data. -- Igor Tandetnik __

[sqlite] queries inside transactions

2011-01-03 Thread Scott A Mintz
If I BEGIN a transaction and perform a number of INSERTS, UPDATES, and DELETES, then do a SELECT, will the data selected be the original unmodified data? In other words, do I need to COMMIT before I see the changes reflected in a SELECT? I can see use cases where I'd desire both behaviors. 1)

Re: [sqlite] The underlying provider failed to open?

2011-01-03 Thread Simon Slavin
On 3 Jan 2011, at 1:58am, Danny Staten wrote: > I am using sqlite with .net and entity framework 4. I am building an > application in WPF that uses the sqlite for my data, and it has gone very > well... up until I formatted my machine and set up my development environment > again. I had ever

Re: [sqlite] customize icu collation rule for special characters & digits

2011-01-03 Thread Simon Slavin
On 3 Jan 2011, at 11:08am, ashish yadav wrote: > I want to sort Special Characters,Digits, Latin and Greek > Characters(language independent sorting order) using ICU collation. > > > The sorting order shall be approached by separating the character set into > three groups: > a. special characte

Re: [sqlite] Create trigger

2011-01-03 Thread Stephan Hüls
Hi Jean-Christophe no no, I had two problems with the wrong syntax and the problem with the sqlite wrapper. The syntax matches now, for the crash of the command I will set QNX a ticket. Learned a lot -:), thank you all, and all the best for the new year. Stephan 2011/1/3 Jean-Christophe Deschamps

Re: [sqlite] UTF-8

2011-01-03 Thread Ming Lu
Hey, i found the solution for the utf-8 encoding problem: i used the: wchar_t chAppWinTextUnicode[MAX_PATH] = { 0 }; ::*GetWindowTextW*(hWnd, chAppWinTextUnicode, MAX_PATH); int nSize = *WideCharToMultiByte*(/*CP_UTF8*/, 0, chAppWinTextUnicode, -1, NULL, 0, NULL, NULL); char* pchBuffer= (char*)

Re: [sqlite] Create trigger

2011-01-03 Thread Jean-Christophe Deschamps
Stephan, >Thanks a lot for your help. It seems we have a problem with our qdbc >command. Its terminateing a sql command when a ; is detected. With sqlite >console your syntax is working: Sorry for misleading you with a phantom missing closing parenthesis, I was doing (or rather trying to do) too

Re: [sqlite] Circular foreign keys

2011-01-03 Thread Yves Goergen
On 03.01.2011 13:15 CE(S)T, Drake Wilson wrote: > Quoth Yves Goergen , on 2011-01-03 13:01:17 > +0100: >> So I have foreign keys from message_revision to message and the other >> way around. This obviously won't work because when defining the table >> message, the table message_revision isn't know

Re: [sqlite] Create trigger

2011-01-03 Thread Stephan Hüls
Thanks a lot for your help. It seems we have a problem with our qdbc command. Its terminateing a sql command when a ; is detected. With sqlite console your syntax is working: hu-intel:/dev/shmem> /fs/sda0/opt/mm/bin/qdbc -dmme "CREATE TRIGGER genre_custom _insert AFTER INSERT ON library_genres B

Re: [sqlite] Circular foreign keys

2011-01-03 Thread Drake Wilson
Quoth Yves Goergen , on 2011-01-03 13:01:17 +0100: > So I have foreign keys from message_revision to message and the other > way around. This obviously won't work because when defining the table > message, the table message_revision isn't known yet. What do you mean? Creating two tables with circ

[sqlite] Circular foreign keys

2011-01-03 Thread Yves Goergen
Hi, I have the following tables (simplified): > CREATE TABLE "message" ( > "MessageId" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, > "CreatedTime" DATETIME NOT NULL, > "Owner" INTEGER NOT NULL REFERENCES "user" ("UserId"), > "PrimaryReference" INTEGER REFERENCES "message" ("MessageId") ON

[sqlite] The underlying provider failed to open?

2011-01-03 Thread Danny Staten
In the desperate hopes that the first email either didn’t send or just got lost in the flurry, I am asking my question a second time. I am using sqlite with .net and entity framework 4. I am building an application in WPF that uses the sqlite for my data, and it has gone very well... up until

[sqlite] customize icu collation rule for special characters & digits

2011-01-03 Thread ashish yadav
Hi, I want to sort Special Characters,Digits, Latin and Greek Characters(language independent sorting order) using ICU collation. The sorting order shall be approached by separating the character set into three groups: a. special characters (i.e. +, -, &, Space, etc.) b. digits (0-9) c. Latin

Re: [sqlite] Create trigger

2011-01-03 Thread Stephan Hüls
Hi Jean-Christophe, I tried it there is a problem, is there a ( missin? hu-intel:/dev/shmem> /fs/sda0/opt/mm/bin/qdbc -dmme "CREATE TRIGGER genre_custom _insert AFTER INSERT ON library_genres BEGIN INSERT INTO genre_custom(genre_id, genre, type) VALUES(NEW.genre_id, NEW.genre, (select type from p

Re: [sqlite] Create trigger

2011-01-03 Thread Jean-Christophe Deschamps
>hu-intel:/dev/shmem> /fs/sda0/opt/mm/bin/qdbc -dmme "CREATE TRIGGER >genre_custom >_insert AFTER INSERT ON library_genres BEGIN INSERT INTO >genre_custom(genre_id, >genre, type) VALUES(NEW.genre_id, NEW.genre, (select type from >podcasts_custom w >here NEW.genre in (SELECT podcast FROM podcasts_c

Re: [sqlite] Create trigger

2011-01-03 Thread Stephan Hüls
Hi Simon, I have seperated the statement. This is working: hu-intel:/dev/shmem> /fs/sda0/opt/mm/bin/qdbc -dmme "select type from podcasts_c ustom where 'Abenteuer' in (SELECT podcast FROM podcasts_custom)" Rows: 75 Cols: 1 Names: +type+ 0: |1| 1: |1| 2: |1| .. The createing

Re: [sqlite] Create trigger

2011-01-03 Thread Stephan Hüls
Hi Jean-Christoph, thanks a lot. I got a problem too: hu-intel:/dev/shmem> /fs/sda0/opt/mm/bin/qdbc -dmme "CREATE TRIGGER genre_custom _insert AFTER INSERT ON library_genres BEGIN INSERT INTO genre_custom(genre_id, genre, type) VALUES(NEW.genre_id, NEW.genre, (select type from podcasts_custom w h

Re: [sqlite] Create trigger

2011-01-03 Thread Jean-Christophe Deschamps
>/fs/sda0/opt/mm/bin/qdbc -dmme "CREATE TRIGGER genre_custom_insert AFTER >INSERT ON library_genres BEGIN INSERT INTO genre_custom(genre_id, genre, >type) VALUES(NEW.genre_id, NEW.genre, (select type from podcasts_custom >where NEW.genre in (SELECT podcast FROM podcasts_custom))); END"

Re: [sqlite] Create trigger

2011-01-03 Thread Stephan Hüls
Hi Igor, thanks a lot this is not working with BEGIN and AND: /fs/sda0/opt/mm/bin/qdbc -dmme "CREATE TRIGGER genre_custom_insert AFTER INSERT ON library_genres BEGIN INSERT INTO genre_custom(genre_id, genre, type) VALUES(NEW.genre_id, NEW.genre, (select type from podcasts_custom where NEW.genre in