Re: [sqlite] Database locked problem

2018-09-30 Thread Simon Slavin
On 30 Sep 2018, at 3:14pm, Lars Frederiksen wrote: > In fact I had the same error some time ago where the solution was to put my > database in a C-drive root folder. But that is where the db is right now!! It is very unusual under Windows to have enough privileges to change files in C:\ . Any

Re: [sqlite] Database locked problem on Windows 7

2018-07-31 Thread Yngve N. Pettersen
On Tue, 31 Jul 2018 18:00:31 +0200, Richard Hipp wrote: On 7/31/18, Yngve N. Pettersen wrote: I sent the email quoted below to the list, but unfortunately, as far as I can tell, I have so far received no response. I think that means that nobody has an answer. I don't have any idea why you

Re: [sqlite] Database locked problem on Windows 7

2018-07-31 Thread Richard Hipp
On 7/31/18, Yngve N. Pettersen wrote: > I sent the email quoted below to the list, but > unfortunately, as far as I can tell, I have so far received no response. > I think that means that nobody has an answer. I don't have any idea why your system would work well on Win10 but not on Win7. SQLit

Re: [sqlite] Database locked problem on Windows 7

2018-07-31 Thread Yngve N. Pettersen
Hello all, About four weeks ago, I sent the email quoted below to the list, but unfortunately, as far as I can tell, I have so far received no response. TL;DR: Concurrent attempts to exclusively lock the database tend to fail on Windows 7 Pro, there is no similar problem on Windows 10. Th

Re: [sqlite] database locked on select

2018-05-28 Thread Torsten Curdt
I have to query an external resource for each row. Unfortunately nothing I can do in a single update query. Would mean keeping a lot of data manually in memory. On Mon, May 28, 2018 at 2:33 AM Abroży Nieprzełoży < abrozynieprzelozy314...@gmail.com> wrote: > BTW why not to update all rows by singl

Re: [sqlite] database locked on select

2018-05-27 Thread Keith Medcalf
Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Deon Brewis >Sent: Sunday, 27 May, 2018 16:50 >To: SQLite mailing list >Subject: Re: [sqlite] database locked on select > >By one connection doing SELECT and UPDATE, do you mean m

Re: [sqlite] database locked on select

2018-05-27 Thread Abroży Nieprzełoży
BTW why not to update all rows by single update query? 2018-05-27 20:30 GMT+02:00, Torsten Curdt : > I am doing a select, then iterate through the resultset and on each row > call update on that row. > I am using the golang driver and ran into the issue that on the update the > database is still l

Re: [sqlite] database locked on select

2018-05-27 Thread Torsten Curdt
There is no multi threading. Just a single thread and only one connection/handle. While iterating through the resultset I am also trying to execute an update for every row. Along the lines of: resultset = db.exec(`select`) foreach row in resultset { db.exec(`update`) } I don't want to r

Re: [sqlite] database locked on select

2018-05-27 Thread Simon Slavin
On 27 May 2018, at 11:49pm, Deon Brewis wrote: > By one connection doing SELECT and UPDATE, do you mean multi-threaded mode > and using the connection from 2 threads? A connection cannot lock the database against itself. If you are doing two operations with one connection, there can be no SQL

Re: [sqlite] database locked on select

2018-05-27 Thread Deon Brewis
By one connection doing SELECT and UPDATE, do you mean multi-threaded mode and using the connection from 2 threads? - Deon -Original Message- From: sqlite-users On Behalf Of Simon Slavin Sent: Sunday, May 27, 2018 3:39 PM To: SQLite mailing list Subject: Re: [sqlite] database locked

Re: [sqlite] database locked on select

2018-05-27 Thread Simon Slavin
On 27 May 2018, at 7:30pm, Torsten Curdt wrote: > I am doing a select, then iterate through the resultset and on each row > call update on that row. > I am using the golang driver and ran into the issue that on the update the > database is still locked from the select. Are you usihg one connecti

Re: [sqlite] database locked in PHP

2015-01-25 Thread Hick Gunter
Maybe you can use the (linux, c) code I posted recently to determine which process/thread is locking the database file. -Ursprüngliche Nachricht- Von: Lev [mailto:leventel...@gmail.com] Gesendet: Sonntag, 25. Jänner 2015 01:36 An: sqlite-users@sqlite.org Betreff: Re: [sqlite] database

Re: [sqlite] database locked in PHP

2015-01-25 Thread Dan Kennedy
On 01/25/2015 07:35 AM, Lev wrote: On Sat, 24 Jan 2015 20:59:22 + Simon Slavin wrote: and set it to 6 (60 seconds) or so. Okay, I try that, but I still don't understand how can a single threaded application get a locked error. Was the error message "database is locked" or "database

Re: [sqlite] database locked in PHP

2015-01-24 Thread Lev
On Sat, 24 Jan 2015 20:59:22 + Simon Slavin wrote: > and set it to 6 (60 seconds) or so. Okay, I try that, but I still don't understand how can a single threaded application get a locked error. Levente ___ sqlite-users mailing list sqlite-use

Re: [sqlite] database locked in PHP

2015-01-24 Thread Simon Slavin
On 24 Jan 2015, at 8:13pm, Lev wrote: > I sometimes get a database locked error when I access the database by > calling the execute() call. This is on PHP. Have you set a timeout ? Immediately after opening the connection use and set it to 6

Re: [sqlite] Database locked after read

2012-12-01 Thread Pavel Ivanov
> I have found that when using SQLite under Windows if you execute an update > statement and then a select statement, the database is locked until the > select statement is finished. How can I stop this from happening? Note that you don't have to execute UPDATE before the SELECT to reproduce that

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Igor Tandetnik
On 2/10/2012 2:57 PM, Marc L. Allen wrote: MSSQL in its default serialization mode does not guarantee repeatable reads within a transaction. But, it provides locking hints to help enforce it when required. I'm guessing that sqlite does guarantee repeatable reads? SQLite implements only one tr

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Marc L. Allen
> -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Igor Tandetnik > Sent: Friday, February 10, 2012 2:36 PM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Database locked in multi process scenario

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Igor Tandetnik
On 2/10/2012 12:29 PM, Sreekumar TP wrote: Can this situation be handled in sqlite - by upgrading the lock to a writer lock ? Since both applications use the same WAL file for read and writes, it shouldnt be a problem , because all changes will be in linear sequence ? Consider again: [1] BEG

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Simon Slavin
On 10 Feb 2012, at 5:55pm, Kit wrote: > 2012/2/10 Simon Slavin : >> On 10 Feb 2012, at 5:32pm, Kit wrote: >>> A situation in which I read from the database first and then changes >>> the data tells me that they are wrong questions. It is such a problem >>> to insert SELECT into UPDATE or INSERT?

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Kit
2012/2/10 Simon Slavin : > On 10 Feb 2012, at 5:32pm, Kit wrote: >> A situation in which I read from the database first and then changes >> the data tells me that they are wrong questions. It is such a problem >> to insert SELECT into UPDATE or INSERT? > > Why do you need to do a SELECT at all ?  C

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Simon Slavin
On 10 Feb 2012, at 5:32pm, Kit wrote: > 2012/2/10 Sreekumar TP : >> Though the example of $ is very intuitive, I am not suggesting that we >> drop one of the transaction and block the database forever (as it is >> happening now). Instead, it could be serialized such that two $100 >> transactions

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Richard Hipp
On Fri, Feb 10, 2012 at 11:45 AM, Sreekumar TP wrote: > There is no recovery from this situation- > The recovery from your situation is to reset or finalize the initial query that is holding the transaction option. > > If you try to rollback, you get the following error -"cannot rollback > save

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Simon Slavin
On 10 Feb 2012, at 5:29pm, Sreekumar TP wrote: > Can this situation be handled in sqlite - by upgrading the lock to a > writer lock ? Since both applications use the same WAL file for read and > writes, it shouldnt be a problem , because all changes will be in linear > sequence ? SQLite handle

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Kit
2012/2/10 Sreekumar TP : >  Though the example of $ is very intuitive, I am not suggesting that we > drop one of the transaction and block the database forever (as it is > happening now). Instead, it could be serialized such that two $100 > transactions are committed to the db. A situation in whic

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Sreekumar TP
Can this situation be handled in sqlite - by upgrading the lock to a writer lock ? Since both applications use the same WAL file for read and writes, it shouldnt be a problem , because all changes will be in linear sequence ? Sreekumar On Fri, Feb 10, 2012 at 10:49 PM, Sreekumar TP wrote: >

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Simon Slavin
> On 2/10/2012 9:57 AM, Sreekumar TP wrote: > >> The last transaction should always be the final one. In a a >> multiprocess/threaded application how can one make assumptions on the >> order >> of updates? SQL does not have any concept of 'last transaction' or 'final transaction' or 'order of tr

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Sreekumar TP
Though the example of $ is very intuitive, I am not suggesting that we drop one of the transaction and block the database forever (as it is happening now). Instead, it could be serialized such that two $100 transactions are committed to the db. On Fri, Feb 10, 2012 at 10:33 PM, Igor Tandetnik wr

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Igor Tandetnik
On 2/10/2012 11:45 AM, Sreekumar TP wrote: There is no recovery from this situation- If you try to rollback, you get the following error -"cannot rollback savepoint, SQL statments in progress" or if you dont use SAVEPOINT - "cannot rollback, no transaction is active" If you start the transactio

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Igor Tandetnik
On 2/10/2012 9:57 AM, Sreekumar TP wrote: The last transaction should always be the final one. In a a multiprocess/threaded application how can one make assumptions on the order of updates? There are two updates in my example: update t set count = count + 1; update t set count = count + 10; D

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Simon Slavin
On 10 Feb 2012, at 4:45pm, Sreekumar TP wrote: > There is no recovery from this situation- > > If you try to rollback, you get the following error -"cannot rollback > savepoint, SQL statments in progress" or if you dont use SAVEPOINT - > "cannot rollback, no transaction is active " > If you sta

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Sreekumar TP
There is no recovery from this situation- If you try to rollback, you get the following error -"cannot rollback savepoint, SQL statments in progress" or if you dont use SAVEPOINT - "cannot rollback, no transaction is active " If you start the transaction with BEGIN IMMEDIATE in App1, the writer i

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Simon Slavin
On 10 Feb 2012, at 3:01pm, Marc L. Allen wrote: > From my background, I'm used to SQL statements blocking until appropriate > locks are acquired. From what I've seen, it looks like sqlite doesn't block, > but returns BUSY, is that correct? You can set a timeout. SQLite tries and retries unti

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Sreekumar TP
und them.) > > Thanks > > > -Original Message- > > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > > boun...@sqlite.org] On Behalf Of Marc L. Allen > > Sent: Friday, February 10, 2012 9:45 AM > > To: General Discussion of SQLite Database &g

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Marc L. Allen
haven't found them.) Thanks > -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Marc L. Allen > Sent: Friday, February 10, 2012 9:45 AM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] D

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Sreekumar TP
The last transaction should always be the final one. In a a multiprocess/threaded application how can one make assumptions on the order of updates? Sreekumar On Fri, Feb 10, 2012 at 8:16 PM, Igor Tandetnik wrote: > Sreekumar TP wrote: > > How is this different from two threads each with a db

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Igor Tandetnik
Sreekumar TP wrote: > How is this different from two threads each with a db connection in a > single process? If each thread uses its own separate connection, it should be no different - you would observe the same issue. > Moreover the journal mode is WAL. Hence the writer should be able to app

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Marc L. Allen
February 10, 2012 9:43 AM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Database locked in multi process scenario > > Marc L. Allen wrote: > > I see. So, the implied commit doesn't occur until you finalize? > > Or reset. > > > As a result, the su

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Richard Hipp
on't hit a BUSY. > > > -Original Message- > > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > > boun...@sqlite.org] On Behalf Of Richard Hipp > > Sent: Friday, February 10, 2012 9:28 AM > > To: General Discussion of SQLite Database > > Subjec

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Igor Tandetnik
Marc L. Allen wrote: > I see. So, the implied commit doesn't occur until you finalize? Or reset. > As a result, the subsequent update in step 5 was added to his > non-finalized select? The update was attempted within the same transaction. > Still.. what is the correct way to handle the expli

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Marc L. Allen
ruary 10, 2012 9:28 AM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Database locked in multi process scenario > > On Fri, Feb 10, 2012 at 9:19 AM, Marc L. Allen > wrote: > > > > > So, you're assuming the OP actually started a transaction? B

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Richard Hipp
you're saying that this causes a problem if App2 gets in > between App1's SELECT and UPDATE? > > > -Original Message- > > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > > boun...@sqlite.org] On Behalf Of Richard Hipp > > Sent: Friday, Februar

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Marc L. Allen
d Hipp > Sent: Friday, February 10, 2012 9:13 AM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Database locked in multi process scenario > > On Fri, Feb 10, 2012 at 9:05 AM, Rob Richardson con.com>wrote: > > > Isn't it almost a requirement of a

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Richard Hipp
012 8:52 AM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Database locked in multi process scenario > > In the real code, there is no sleep/wait or pause. It so happens that the > write of the app2 is scheduled in between. > > What you are suggesting

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Richard Hipp
scenario, I thought that Step 5 would block waiting > for App1 to finalize. > > > -Original Message- > > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > > boun...@sqlite.org] On Behalf Of Simon Slavin > > Sent: Friday, February 10, 2012 8:55 AM &g

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Rob Richardson
Sent: Friday, February 10, 2012 8:52 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Database locked in multi process scenario In the real code, there is no sleep/wait or pause. It so happens that the write of the app2 is scheduled in between. What you are suggesting is that a

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Marc L. Allen
ze. > -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Simon Slavin > Sent: Friday, February 10, 2012 8:55 AM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Database locked in multi proce

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Simon Slavin
On 10 Feb 2012, at 1:52pm, Sreekumar TP wrote: > In the real code, there is no sleep/wait or pause. It so happens that the > write of the app2 is scheduled in between. > > What you are suggesting is that at any point of time only one process can > have a transaction open in a database? I unders

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Sreekumar TP
In the real code, there is no sleep/wait or pause. It so happens that the write of the app2 is scheduled in between. What you are suggesting is that at any point of time only one process can have a transaction open in a database? Sreekumar On Feb 10, 2012 7:12 PM, "Simon Slavin" wrote: > > On

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Simon Slavin
On 10 Feb 2012, at 1:32pm, Sreekumar TP wrote: > well, the 'wait' is a simulation of what happens in the real code. > > The error is fatal to the application as it never ever recovers from it > even though the writer has finalized and terminated. In a multi-process environment I recommend that

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Sreekumar TP
Hi Simon, well, the 'wait' is a simulation of what happens in the real code. The error is fatal to the application as it never ever recovers from it even though the writer has finalized and terminated. Sreekumar On Feb 10, 2012 6:57 PM, "Simon Slavin" wrote: > > On 10 Feb 2012, at 11:47am, Sre

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Simon Slavin
On 10 Feb 2012, at 11:47am, Sreekumar TP wrote: > I have a 'database is locked' issued which can be reproduced as follows. > > I have two applications opening the database in WAL mode. The threading > mode is SERIALIZED. Environment is PC/Linux. > > > > Step1: Launch App1 followed by App 2

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Sreekumar TP
How is this different from two threads each with a db connection in a single process? Moreover the journal mode is WAL. Hence the writer should be able to append changes to the WAL file as there are no other write transaction. Sreekumar On Feb 10, 2012 6:22 PM, "Richard Hipp" wrote: > On Fri, F

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Richard Hipp
On Fri, Feb 10, 2012 at 6:47 AM, Sreekumar TP wrote: > I have a 'database is locked' issued which can be reproduced as follows. > > I have two applications opening the database in WAL mode. The threading > mode is SERIALIZED. Environment is PC/Linux. > > > > Step1: Launch App1 followed by App 2

Re: [sqlite] Database locked error, while deleting

2008-06-10 Thread Joanne Pham
he shared cache mode or not. Thanks, JP - Original Message From: D. Richard Hipp <[EMAIL PROTECTED]> To: General Discussion of SQLite Database Sent: Tuesday, June 10, 2008 7:30:09 AM Subject: Re: [sqlite] Database locked error, while deleting On Jun 10, 2008, at 10:18 AM,

Re: [sqlite] Database locked error, while deleting

2008-06-10 Thread D. Richard Hipp
On Jun 10, 2008, at 10:18 AM, Shailesh Birari wrote: > Richard, > Just to go one step ahead, If there are independent connections, do > you > mean that there can exist multiple transactions at the same time? I > think not since the first transaction (write) will exclusively lock > the > datab

Re: [sqlite] Database locked error, while deleting

2008-06-10 Thread Shailesh Birari
abase > Subject: Re: [sqlite] Database locked error, while deleting > > > On Jun 10, 2008, at 7:36 AM, Sabyasachi Ruj wrote: > > > Hi, > > > > I have a very big table with around 40,00, 000 rows. 4 columns. 220 > > MB. > > > > Now, I have tw

Re: [sqlite] Database locked error, while deleting

2008-06-10 Thread Sabyasachi Ruj
Our PRAGMA cache_size = 4000. Is there any recommended way to calculate the cache size needed? On Tue, Jun 10, 2008 at 5:29 PM, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > "Sabyasachi Ruj" <[EMAIL PROTECTED]> > wrote in message > news:[EMAIL PROTECTED]<[EMAIL PROTECTED]> > > Now, I have two thre

Re: [sqlite] Database locked error, while deleting

2008-06-10 Thread Sabyasachi Ruj
We are using two different connections to sqlite for these two different threads. So, we are not sharing the connection in SELECT and the DELETE thread. On Tue, Jun 10, 2008 at 5:28 PM, D. Richard Hipp <[EMAIL PROTECTED]> wrote: > > On Jun 10, 2008, at 7:36 AM, Sabyasachi Ruj wrote: > > > Hi, > >

Re: [sqlite] Database locked error, while deleting

2008-06-10 Thread Igor Tandetnik
"Sabyasachi Ruj" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Now, I have two threads:- > Thread1: Is deleting 7,00, 000 rows from the table. > Thread2: Is doing SELECT on the same table. > > Now the problem is sometimes the sqlite3_prepare for the SELECT query > is failing with SQ

Re: [sqlite] Database locked error, while deleting

2008-06-10 Thread Mihai Limbasan
Sabyasachi Ruj wrote: Hi, Hello there! I have a very big table with around 40,00, 000 rows. 4 columns. 220 MB. Now, I have two threads:- Thread1: Is deleting 7,00, 000 rows from the table. Thread2: Is doing SELECT on the same table. Now the problem is sometimes the sqlite3_prepare for the

Re: [sqlite] Database locked error, while deleting

2008-06-10 Thread D. Richard Hipp
On Jun 10, 2008, at 7:36 AM, Sabyasachi Ruj wrote: > Hi, > > I have a very big table with around 40,00, 000 rows. 4 columns. 220 > MB. > > Now, I have two threads:- > Thread1: Is deleting 7,00, 000 rows from the table. > Thread2: Is doing SELECT on the same table. > > Now the problem is sometim

Re: [sqlite] Database locked error, while deleting

2008-06-10 Thread D. Richard Hipp
On Jun 10, 2008, at 7:50 AM, Alex Katebi wrote: > There can only be one prepare per table at a time. The first prepare > has to > be finalized before another one. Table is locked by the first > prepare until > finalized. > Actually, there is no limit on the number of prepared statements on a

Re: [sqlite] Database locked error, while deleting

2008-06-10 Thread Alex Katebi
There can only be one prepare per table at a time. The first prepare has to be finalized before another one. Table is locked by the first prepare until finalized. On Tue, Jun 10, 2008 at 7:36 AM, Sabyasachi Ruj <[EMAIL PROTECTED]> wrote: > Hi, > > I have a very big table with around 40,00, 000 ro

Re: [sqlite] Database locked version 3.3.17

2007-05-10 Thread Ken
Resolved the issue. My issue on the app side. I think the newer version is much faster. So much so that it changed timing characteristics and reveald a logic bug in my code. Appologies, Ken Ken <[EMAIL PROTECTED]> wrote: Hi all, Think I may have hit some form of a bug in 3.3.

Re: [sqlite] Database Locked

2006-11-14 Thread John Stanton
You have to find what is locking the database and unlock it. Lloyd wrote: I have tracked down the problem and found th following. I have a select statement which stores the result set in a pointer variable. If the result set of select statement is empty, the program executes, otherwise it gives

Re: [sqlite] Database Locked

2006-11-14 Thread Lloyd
Thanks Clay Dowling, Yes there is a function for fanalize function. Now the problem is solved. On Tue, 2006-11-14 at 08:02 -0500, Clay Dowling wrote: > Lloyd, > > You need at some point to call the sqlite3_finalize function. I don't use > wxSqlite, but if it's not handled by the destructor of

Re: [sqlite] Database Locked

2006-11-14 Thread Clay Dowling
Lloyd, You need at some point to call the sqlite3_finalize function. I don't use wxSqlite, but if it's not handled by the destructor of the recordset then there should be a method, possibly called finalize or close, that needs to be called. I recommend consulting the documentation for wxSQLite

Re: [sqlite] Database Locked

2006-11-14 Thread Lloyd
I have tracked down the problem and found th following. I have a select statement which stores the result set in a pointer variable. If the result set of select statement is empty, the program executes, otherwise it gives a Database Locked error. How can I solve this problem ? Thanks again,

Re: [sqlite] database locked

2006-08-21 Thread Jay Sprenkle
On 8/21/06, Laura Longo <[EMAIL PROTECTED]> wrote: Hi all, I'm a software developer and I'm using sqlite3 for my application in c++. This is the problem I've found: two processes do queries (about 1 query per second) on one database; the 'select' queries don't have any problem, while 'update' q

Re: [sqlite] Database locked. Any idea ?

2006-06-26 Thread Mario . Hebert
PM Please respond to sqlite-users@sqlite.org To sqlite-users@sqlite.org cc Subject Re: [sqlite] Database locked. Any idea ? [EMAIL PROTECTED] wrote: > > Anyone has an idea of what may be wrong ? Oh yeah, I am running of my own > port using uCos and a memory database. >

Re: [sqlite] Database locked. Any idea ?

2006-06-21 Thread Mario . Hebert
Sqlite3BtreeCursor wrFlag = 0; Any idea how my table should be unlocked ? Mario Hebert Legerity [EMAIL PROTECTED] 06/20/2006 03:07 PM Please respond to sqlite-users@sqlite.org To sqlite-users@sqlite.org cc Subject Re: [sqlite] Database locked. Any idea ? [EMAIL

RE: [sqlite] Database locked. Any idea ?

2006-06-20 Thread Lodewijk Duymaer van Twist
Hi, I don't know if I can help you with your problem, but I'm interested in what you are trying to do, are u using uCos on a Z-World based system? Kind regards, Lodewijk Duymaer van Twist

Re: [sqlite] Database locked. Any idea ?

2006-06-20 Thread Mario . Hebert
Yes I am using a :memory: database created from 3 flash database that were previously attached to it. I am not quite sure of the amount of work that would be required for me to port it to linux. I will try later today to build it under cygwin and see if the same behavior occurs. Regards, Mar

Re: [sqlite] Database locked. Any idea ?

2006-06-20 Thread drh
[EMAIL PROTECTED] wrote: > > Anyone has an idea of what may be wrong ? Oh yeah, I am running of my own > port using uCos and a memory database. > You say you are using a ":memory:" database and this is happening? Can you provide a test program running under Linux? -- D. Richard Hipp <[EMAIL

Re: [sqlite] Database Locked Error

2006-01-31 Thread Ritesh Kapoor
I used the fuser and lsof commands and found out that no other process is accessing the database file. So it seems that the assumption of another process accessing the file was wrong. Though the problem still remains unsolved. Thanks Ritesh On Tue, 2006-01-31 at 18:02, Christian Smith wrote: >

Re: [sqlite] Database Locked Error

2006-01-31 Thread Ritesh Kapoor
I've tried to copy/paste and simplify the code. Please assume that the sql query on line #19 is correct, its actually longer so i truncated it. getDB() returns _db. I checked the value of _db after the sqlite3_open() fn call its a valid handle. I'm trying to understand fuser and lsof commands a

Re: [sqlite] Database Locked Error

2006-01-31 Thread Christian Smith
On Tue, 31 Jan 2006, Ritesh Kapoor wrote: >Regarding the configuration of NFS - >I have two machines with NFS on them. >- if i run the app on machine 1 it works properly >- now when i run the app on machine 2 it works properly > >But if I login to machine 2 from machine 1 and then run the app I ge

Re: [sqlite] Database Locked Error

2006-01-31 Thread Ritesh Kapoor
Please ommit line #18 from the sequence of statements and then reply. Thanks Ritesh On Tue, 2006-01-31 at 16:42, Ritesh Kapoor wrote: > Regarding the configuration of NFS - > I have two machines with NFS on them. > - if i run the app on machine 1 it works properly > - now when i run the app on ma

Re: [sqlite] Database Locked Error

2006-01-31 Thread Ritesh Kapoor
Regarding the configuration of NFS - I have two machines with NFS on them. - if i run the app on machine 1 it works properly - now when i run the app on machine 2 it works properly But if I login to machine 2 from machine 1 and then run the app I get the 'database is locked' error message. The se

Re: [sqlite] Database Locked Error

2006-01-30 Thread drh
Ritesh Kapoor <[EMAIL PROTECTED]> wrote: > Yes. > My machine has NFS and the machines I log onto also have NFS. But if > this is the problem then why dosen't it appear on my machine when I run > the app. Perhaps you are using a local filesystem when you run on your machine. Or perhaps NFS is co

Re: [sqlite] Database Locked Error

2006-01-30 Thread Ritesh Kapoor
Yes. My machine has NFS and the machines I log onto also have NFS. But if this is the problem then why dosen't it appear on my machine when I run the app. Is there a workaround for this? without having to change the file system from NFS. Thanks, Ritesh On Mon, 2006-01-30 at 18:12, [EMAIL PROTECT

Re: [sqlite] Database Locked Error

2006-01-30 Thread drh
Ritesh Kapoor <[EMAIL PROTECTED]> wrote: > > Can anyone suggest what the problem is with sqlite when running apps on > different machines. This happens sometimes when NFS us misconfigured so that it does not support fcntl() file locks. The lock requests always fail, hence SQLite always returns

Re: [sqlite] Database locked after crash

2005-05-17 Thread Ara.T.Howard
On Tue, 17 May 2005, Jaap Krabbendam wrote: I have been simulating a crash during a transaction. After BEGIN, at some point I do exit(-1) instead of COMMIT or ROLLBACK in order to simulate a crash. After that, I can see that a -journal file is present. If I restart my executable, it seems that the

Re: [sqlite] Database locked after crash

2005-05-17 Thread Jaap Krabbendam
I do have some code here. It is clear that the problem is related to using threads. I did not see the problem having just the main program. Note that it is my objective to test a crash, hence the exit(0) from my_thread. The same phenomenon is seen when replacing exit(0) by while(1) sleep(100) and t

Re: [sqlite] Database locked after crash

2005-05-17 Thread Jaap Krabbendam
I'll try to get the essentials in a short program (and hope that it still reproduces the problem). I'll get back on this later. Jaap Krabbendam > >Can you post code? > >--- Jaap Krabbendam <[EMAIL PROTECTED]> wrote: > >> >> Hi, >> >> I have been simulating a crash during a transaction. After B

Re: [sqlite] Database locked after crash

2005-05-17 Thread Dan Kennedy
Can you post code? --- Jaap Krabbendam <[EMAIL PROTECTED]> wrote: > > Hi, > > I have been simulating a crash during a transaction. After BEGIN, at some > point > I do exit(-1) instead of COMMIT or ROLLBACK in order to simulate a crash. > > After that, I can see that a -journal file is present

Re: [sqlite] Database locked

2004-08-11 Thread Felipe Lopes
Thank you!! Was just wondering, does it escape the double quotes around the data?? Thanx again Felipe Lopes Em 11 Aug 2004, [EMAIL PROTECTED] escreveu: >Felipe Lopes wrote: >> >> I am trying to import a csv file (ip-to-country to be especific) to a >table >> on sqlite db. >> > >Ver

Re: [sqlite] Database locked

2004-08-11 Thread Felipe Lopes
Where can I found more about transaction? Em 11 Aug 2004, [EMAIL PROTECTED] escreveu: >Felipe Lopes wrote: > >>Hi there! >> >>I am trying to import a csv file (ip-to-country to be especific) to a table >>on sqlite db...It has 5+ lines. Tried to use php and it takes like 10 >>minutes

Re: [sqlite] Database locked

2004-08-11 Thread D. Richard Hipp
Brass Tilde wrote: Version 2.8: COPY FROM '' USING DELIMITERS ','; You weren't a Clipper/XBase programmer at one time, were you? :-> Never. The COPY command in version 2.8 was taken from PostgreSQL. -- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565

Re: [sqlite] Database locked

2004-08-11 Thread Brass Tilde
> > I am trying to import a csv file (ip-to-country to be especific) to a table > > on sqlite db. > > > > Version 2.8: > > COPY FROM '' USING DELIMITERS ','; You weren't a Clipper/XBase programmer at one time, were you? :->

Re: [sqlite] Database locked

2004-08-11 Thread D. Richard Hipp
Felipe Lopes wrote: I am trying to import a csv file (ip-to-country to be especific) to a table on sqlite db. Version 2.8: COPY FROM '' USING DELIMITERS ','; Version 3.0: .mode csv .import -- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565

Re: [sqlite] Database locked

2004-08-11 Thread Bertrand Mansion
Felipe Lopes wrote: >Hi there! > >I am trying to import a csv file (ip-to-country to be especific) to a table >on sqlite db...It has 5+ lines. Tried to use php and it takes like 10 >minutes loading and returns that the database is locked...When I take a look >at the table, it has only 9000

Re: [sqlite] Database locked

2004-08-10 Thread Mauricio Piacentini
> I am trying to import a csv file (ip-to-country to be especific) to a > table > on sqlite db...It has 5+ lines. Tried to use php and it takes like If you are using SQLite 2.8.x you can try importing the file with SQLite Database Browser (sqlitebrowser.sourceforge.net). Use the FILE->IMPORT->