Re: [sqlite] Data error

2014-10-19 Thread Keith Medcalf
That MSDN article only applies to 'System Restore'. System Restore does not do anything with "User Data" but only with "System Data". Of course, if you store "User Data" in a place where "System Data" is supposed to be stored, then your "User Data" is "System Data", not "User Data", and subje

Re: [sqlite] Question on locks

2014-10-19 Thread Keith Medcalf
Actually, you should set the timeout for each connection. The computer does not matter. >-Original Message- >From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- >boun...@sqlite.org] On Behalf Of Simon Slavin >Sent: Sunday, 19 October, 2014 18:35 >To: General Discussion of SQLite

Re: [sqlite] Question on locks

2014-10-19 Thread Simon Slavin
On 20 Oct 2014, at 1:15am, Ali Jawad wrote: > Thanks, I hope it works, I hate to use MySQL for this project. Pardon my > ignorance but the example at hand below is for C, any ideas on how to set > for Bash and PHP ? Or better yet globally for sqlite3 There's a PRAGMA which sets the same thing:

Re: [sqlite] Question on locks

2014-10-19 Thread Ali Jawad
Thanks, I hope it works, I hate to use MySQL for this project. Pardon my ignorance but the example at hand below is for C, any ideas on how to set for Bash and PHP ? Or better yet globally for sqlite3 int sqlite3_busy_timeout(sqlite3*, int ms); On Mon, Oct 20, 2014 at 2:00 AM, Simon Slavin wro

Re: [sqlite] Question on locks

2014-10-19 Thread Simon Slavin
On 18 Oct 2014, at 1:32pm, Ali Jawad wrote: > I do have one sqlite DB, with multiple dbs, and multiple scripts writing to > those tables, at one time only one script writes to one table, I.e. there > is no simultaneous read/write access to one table at one time. However, I > am getting DB locked

Re: [sqlite] Data error

2014-10-19 Thread Simon Slavin
On 18 Oct 2014, at 6:25am, aaquib Khan wrote: > i have encountered a strange issue lately, i am using sqllite in my windows > application. The logic in application is, at the start of the application > db file is created, and it is deleted when the application is closed. Now > when i again start

[sqlite] Question on locks

2014-10-19 Thread Ali Jawad
Hi I do have one sqlite DB, with multiple dbs, and multiple scripts writing to those tables, at one time only one script writes to one table, I.e. there is no simultaneous read/write access to one table at one time. However, I am getting DB locked errors, did I misunderstand Sqlite3 ? Is the lock p

[sqlite] Data error

2014-10-19 Thread aaquib Khan
Hi, i have encountered a strange issue lately, i am using sqllite in my windows application. The logic in application is, at the start of the application db file is created, and it is deleted when the application is closed. Now when i again start my application the db file is created but it contai

[sqlite] Bug 993556 - SQLite crash in walIndexTryHdr due to Windows EXCEPTION_IN_PAGE_ERROR exception

2014-10-19 Thread Deon Brewis
I'm trying to follow Richard's advise to work around this issue, which is: "Is that database ever used by more than a single process. (Use by multiple threads using separate connections does not count - I mean really used by multiple processes with their own address space.) If not (and I think t

Re: [sqlite] 'INTEGER PRIMARY KEY' start value

2014-10-19 Thread Luuk
On 19-10-2014 17:48, Keith Medcalf wrote: for a table test(i integer primary key, j integer) the new i (rowid) is as follows: test.i = case when test.i is not null then test.i else case max(test.i) when null then 1 else max(test.i)+1 end end if you add the autoincrement keyword, then the al

Re: [sqlite] 'INTEGER PRIMARY KEY' start value

2014-10-19 Thread Keith Medcalf
for a table test(i integer primary key, j integer) the new i (rowid) is as follows: test.i = case when test.i is not null then test.i else case max(test.i) when null then 1 else max(test.i)+1 end end if you add the autoincrement keyword, then the algorithm becomes test.i = case when test.i i

Re: [sqlite] 'INTEGER PRIMARY KEY' start value

2014-10-19 Thread Luuk
On 19-10-2014 15:27, Baruch Burstein wrote: Is the rowid/'INTEGER PRIMARY KEY' field that is not entered manually guaranteed to start from 1? Or at least from a positive number? no C:\temp>sqlite3 SQLite version 3.8.4.3 2014-04-03 16:53:12 Enter ".help" for usage hints. Connected to a transie

Re: [sqlite] 'INTEGER PRIMARY KEY' start value

2014-10-19 Thread Simon Slavin
On 19 Oct 2014, at 2:27pm, Baruch Burstein wrote: > Is the rowid/'INTEGER PRIMARY KEY' field that is not entered manually > guaranteed to start from 1? Or at least from a positive number? See the section 'Background' in for the 'usual' algorithm used for

[sqlite] 'INTEGER PRIMARY KEY' start value

2014-10-19 Thread Baruch Burstein
Is the rowid/'INTEGER PRIMARY KEY' field that is not entered manually guaranteed to start from 1? Or at least from a positive number? -- ˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqli

Re: [sqlite] group_concat query performance

2014-10-19 Thread Kraijenbrink - FixHet - Systeembeheer
>Have you tested using a transaction over your combined queries? >Even for simple read operations this may give a huge performance difference. Yes, we did. Not only for performance reasons but for "automatic cleanup" in case of an error as well. -- Peter __