[sqlite] Do I really need rollback after sqlite3_step returns BUSY?

2014-01-07 Thread Woody Wu
Hi, The manual says that it should to rollback after sqlite3_step() returns SQLITE_BUSY as long as the current statment is in a transaction. Is this true? Why I cannot just sleep for a while and redo the sqlite3_step()? Thanks in advance. -- Life is the only flaw in an otherwise perfect

Re: [sqlite] Do I really need rollback after sqlite3_step returns BUSY?

2014-01-07 Thread Clemens Ladisch
Woody Wu wrote: > The manual says that it should to rollback after sqlite3_step() returns > SQLITE_BUSY as long as > the current statment is in a transaction. Is this true? Yes. If you have a transaction, you must _eventually_ commit or rollback. > Why I cannot just sleep for a while and redo

Re: [sqlite] Do I really need rollback after sqlite3_step returns BUSY?

2014-01-07 Thread Simon Slavin
On 7 Jan 2014, at 8:50am, Woody Wu wrote: > Why I cannot just > sleep for a while > and redo the sqlite3_step()? If you want to sleep for a while then try _step() again you can get the same result without any programming. Simply set sqlite3_busy_timeout() to the time

Re: [sqlite] Do I really need rollback after sqlite3_step returns BUSY?

2014-01-07 Thread Woody Wu
Thanks for the clear guide. _busy_timeout is easier to use. By the way, i want confirm that if i am not in an explicit transaction, i can simply redo the _step() invoking, right? On Tuesday, 7 January 2014, Simon Slavin wrote: > > On 7 Jan 2014, at 8:50am, Woody Wu

Re: [sqlite] Do I really need rollback after sqlite3_step returns BUSY?

2014-01-07 Thread Simon Slavin
On 7 Jan 2014, at 10:13am, Woody Wu wrote: > Thanks for the clear guide. _busy_timeout is easier to use. By the way, i > want confirm that if i am not in an explicit transaction, i can simply redo > the _step() invoking, right? However, if you are using _timeout()

[sqlite] SQLite with Windows 2003 Server Connection

2014-01-07 Thread gert1111
Hello, I have troubles connecting to a SQlite DB stored on a Windows 2003 Server. When the SQlite DB is stored local, or on a Windows 2008 Server or on another computer in the network, or a NAS, there is no problems. When the DB is stored on the Windows 2003 Server, the program connecting to it

Re: [sqlite] Do I really need rollback after sqlite3_step returns BUSY?

2014-01-07 Thread Woody Wu
Hi, Simon What means "using _timeout()" properly? The manual says, _timeout() can still make _step() returns SQLITE_BUSY or SQLITE_IOERR_BLOCKED if the user provided timeout value eventually accumulated. For example, if I set _timeout() to 3000ms, but after that time, the table I was trying to

Re: [sqlite] Do I really need rollback after sqlite3_step returns BUSY?

2014-01-07 Thread Simon Slavin
On 7 Jan 2014, at 2:26pm, Woody Wu wrote: > What means "using _timeout()" properly? The manual says, _timeout() can > still make _step() returns SQLITE_BUSY or SQLITE_IOERR_BLOCKED if the user > provided timeout value eventually accumulated. For example, if I set >

Re: [sqlite] Do I really need rollback after sqlite3_step returns BUSY?

2014-01-07 Thread Yuriy Kaminskiy
Woody Wu wrote: > Hi, Simon > > On 7 January 2014 19:32, Simon Slavin wrote: > >> On 7 Jan 2014, at 10:13am, Woody Wu wrote: >> >>> Thanks for the clear guide. _busy_timeout is easier to use. By the >>> way, i want confirm that if i am not in an

Re: [sqlite] Do I really need rollback after sqlite3_step returns BUSY?

2014-01-07 Thread Jay Kreibich
On Jan 7, 2014, at 4:13 AM, Woody Wu wrote: > Thanks for the clear guide. _busy_timeout is easier to use. By the way, i > want confirm that if i am not in an explicit transaction, i can simply redo > the _step() invoking, right? No. You executed a statement.

[sqlite] fstat warning with SQLite 3.8.1 on Android

2014-01-07 Thread Sascha Sertel
Hello, I'm hoping someone has any ideas what to do about the error messages I'm getting from SQLite 3.8.1 when run on Android: Getting warning: "cannot fstat db file " -- please take note that there is a blank inserted for the file name This is on Android 4.3 KitKat with manually compiled

Re: [sqlite] fstat warning with SQLite 3.8.1 on Android

2014-01-07 Thread Richard Hipp
Can you turn on warning and error logging to get additional information: http://www.sqlite.org/errlog.html On Tue, Jan 7, 2014 at 3:55 PM, Sascha Sertel wrote: > Hello, > > > I'm hoping someone has any ideas what to do about the error messages I'm > getting from