Re: [sqlite] Which SQLite API return SQLITE_BUSY?

2010-07-13 Thread Lloyd
Thanks Jay for your detailed reply.
I would be more happy if the SQLite documentaion include the error codes 
each function can return.

Thanks a lot,
  Lloyd


- Original Message - 
From: "Jay A. Kreibich" <j...@kreibi.ch>
To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org>
Sent: Thursday, July 08, 2010 8:27 PM
Subject: Re: [sqlite] Which SQLite API return SQLITE_BUSY?


> On Thu, Jul 08, 2010 at 12:42:36PM +0530, Lloyd scratched on the wall:
>> Hi,
>>
>> Which are all the type of SQLite APIs can return SQLITE_BUSY?
>>
>> sqlite3_open_v2
>> sqlite3_prepare_v2
>
>  All styles of these calls, not just the _v2 versions.
>
>> sqlite3_step
>
>  That's the big one.
>
>> sqlite3_finalize
>
>  sqlite3_reset() can as well, but in the case of both _finalize() and
>  _reset() the call itself (e.g. the finalize operation or reset
>  operation) will always work.  The error code is returned as the "left
>  over" from sqlite3_step().  See the history between _prepare() and
>  _prepare_v2().
>
>> sqlite3_bind_blob
>> sqlite3_column_int
>
>  The sqlite3_column_xxx() and sqlite3_bind_xxx() calls should not.
>
>
>
>  Additionally, sqlite3_blob_open() can, however, as can some of the
>  sqlite3_backup_xxx() calls (they use _prepare/_step internally).
>  sqlite3_exec() and sqlite3_get_table() as well.
>
>
>  sqlite3_close() can also return SQLITE_BUSY, but it isn't a locking
>  issue-- it just means you forgot to finalize all the statements.
>  IIRC, there are one or two other functions that do something similar,
>  but they're usually pretty obvious.
>
>  I think that's the bulk of it, however.
>
>   -j
>
> -- 
> Jay A. Kreibich < J A Y  @  K R E I B I.C H >
>
> "Intelligence is like underwear: it is important that you have it,
> but showing it to the wrong people has the tendency to make them
> feel uncomfortable." -- Angela Johnson
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> 



__
Scanned and protected by Email scanner
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Which SQLite API return SQLITE_BUSY?

2010-07-08 Thread Jay A. Kreibich
On Thu, Jul 08, 2010 at 12:42:36PM +0530, Lloyd scratched on the wall:
> Hi,
> 
> Which are all the type of SQLite APIs can return SQLITE_BUSY?
> 
> sqlite3_open_v2
> sqlite3_prepare_v2

  All styles of these calls, not just the _v2 versions.

> sqlite3_step

  That's the big one.

> sqlite3_finalize

  sqlite3_reset() can as well, but in the case of both _finalize() and
  _reset() the call itself (e.g. the finalize operation or reset
  operation) will always work.  The error code is returned as the "left
  over" from sqlite3_step().  See the history between _prepare() and
  _prepare_v2().

> sqlite3_bind_blob
> sqlite3_column_int

  The sqlite3_column_xxx() and sqlite3_bind_xxx() calls should not.



  Additionally, sqlite3_blob_open() can, however, as can some of the
  sqlite3_backup_xxx() calls (they use _prepare/_step internally).
  sqlite3_exec() and sqlite3_get_table() as well.


  sqlite3_close() can also return SQLITE_BUSY, but it isn't a locking
  issue-- it just means you forgot to finalize all the statements.
  IIRC, there are one or two other functions that do something similar,
  but they're usually pretty obvious.

  I think that's the bulk of it, however.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Which SQLite API return SQLITE_BUSY?

2010-07-08 Thread Lloyd
Hi,

Which are all the type of SQLite APIs can return SQLITE_BUSY?

sqlite3_open_v2
sqlite3_prepare_v2
sqlite3_step
sqlite3_finalize
sqlite3_bind_blob
sqlite3_column_int

Thanks,
  Lloyd




__
Scanned and protected by Email scanner
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users