Re: [sqlite] sqlite3_finalize

2012-05-14 Thread Richard Hipp
On Mon, May 14, 2012 at 7:55 AM, Baruch Burstein wrote: > If sqlite3_prepare_v2 didn't return SQLITE_OK, do I need to call > sqlite3_finalize on the statement pointer? > No. If sqlite3_prepare_v2() returns anything other than SQLITE_OK then the statement pointer will be NULL. A call to sqlite3_

[sqlite] sqlite3_finalize

2012-05-14 Thread Baruch Burstein
If sqlite3_prepare_v2 didn't return SQLITE_OK, do I need to call sqlite3_finalize on the statement pointer? -- Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the

Re: [sqlite] sqlite3_finalize(transaction_stmt) nonsense ?

2010-01-29 Thread Joost
And yes - i failed at another point: hangup() must work so: PyObject *LiteLineUp_HangUp(litelineup *self) { Py_ssize_t i = 0; if (self->COMMIT_stmt) { sqlite3_finalize(self->COMMIT_stmt); self->COMMIT_stmt = NULL; } while (L3LSELF->update_stmts[i++]) sqlite3_finalize(self- >up

[sqlite] sqlite3_finalize(transaction_stmt) nonsense ?

2010-01-28 Thread Joost
Hm - yes, i thought so too and was very astonished identifying those lines as the supposed cause of crashing. But without them everything seems to work well, there is no segfault at ending the test script too (as there is with errors at Python's reference counts). Then something else must be wrong

Re: [sqlite] sqlite3_finalize(transaction_stmt) nonsense ?

2010-01-28 Thread Dan Kennedy
On Jan 29, 2010, at 1:17 PM, Joost wrote: > Hi all, > > at first i want to say a big "Thank you" to all sqlite developers. > Using > sqlite with Python since 4 years i always (when suited) announce > sqlite > in my examples for great open source software - indeed i see it as > one > of the

[sqlite] sqlite3_finalize(transaction_stmt) nonsense ?

2010-01-28 Thread Joost
Hi all, at first i want to say a big "Thank you" to all sqlite developers. Using sqlite with Python since 4 years i always (when suited) announce sqlite in my examples for great open source software - indeed i see it as one of the best pieces of software in the world. The same can be said for

Re: [sqlite] sqlite3_finalize(sqlite3_stmt) is this call clean up thememory

2009-05-03 Thread Joanne Pham
Thanks a lot Igor for respond my email. JP From: Igor Tandetnik To: sqlite-users@sqlite.org Sent: Sunday, May 3, 2009 7:05:52 PM Subject: Re: [sqlite] sqlite3_finalize(sqlite3_stmt) is this call clean up thememory "Joanne Pham" wrote in me

Re: [sqlite] sqlite3_finalize(sqlite3_stmt) is this call clean up thememory

2009-05-03 Thread Igor Tandetnik
"Joanne Pham" wrote in message news:111052.72599...@web90308.mail.mud.yahoo.com > Is sqlite3_finalize(sqlite3_stmt) cleaning up the memory which is > allocated by sqlite_prepare()? > I checked the database statement handle before calling > sqlite3_finalize and after calling this sqlite3_finalize t

[sqlite] sqlite3_finalize(sqlite3_stmt) is this call clean up the memory

2009-05-03 Thread Joanne Pham
Hi All, Is sqlite3_finalize(sqlite3_stmt) cleaning up the memory which is allocated by sqlite_prepare()? I checked the database statement handle before calling sqlite3_finalize and after calling this sqlite3_finalize the address is the same. I was wordering if the memory of database statement han

Re: [sqlite] sqlite3_finalize and threading (was sqlite_master table and SQLITE_MISUSE)

2009-03-02 Thread D. Richard Hipp
On Mar 2, 2009, at 9:52 PM, Lukhnos D. Liu wrote: > Hi, > > I posted a question a few days ago on the cause of getting > SQLITE_MISUSE when I called sqlite3_prepare_v2. I thought I both ruled > out the possibilites advised by the replies and solved the probelm by > finalizing statements on the sq

[sqlite] sqlite3_finalize and threading (was sqlite_master table and SQLITE_MISUSE)

2009-03-02 Thread Lukhnos D. Liu
Hi, I posted a question a few days ago on the cause of getting SQLITE_MISUSE when I called sqlite3_prepare_v2. I thought I both ruled out the possibilites advised by the replies and solved the probelm by finalizing statements on the sqlite_master table earlier. Well the problem didn't get s

Re: [sqlite] sqlite3_finalize removes registered custom functions?

2009-02-23 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Anil Madhavapeddy wrote: > The custom functions are registered against the database handle, but > when prepared statements are garbage collected (and hence call > sqlite3_finalize() on the statement handle), the custom functions > appear to disap

[sqlite] sqlite3_finalize removes registered custom functions?

2009-02-23 Thread Anil Madhavapeddy
I've extended the OCaml SQLite3 bindings to have custom aggregate function support, but have run into a slight snag. The custom functions are registered against the database handle, but when prepared statements are garbage collected (and hence call sqlite3_finalize() on the statement handle)

[sqlite] sqlite3_finalize() vs sqlite3_reset()

2009-02-13 Thread Joanne Pham
Hi All, sqlite3_reset()  function is called to reset a prepared statement object back to its initial state, ready to be re-executed. So if the sqlite3_step is return back SQL_BUSY we need to retry the execution again do I need to call sqlite3_reset() before retry to execute again.   And after co

Re: [sqlite] sqlite3_finalize (pStmt=0x28) at ../src/vdbeapi.c:204

2009-02-13 Thread Joanne Pham
 sqlite3_free((char*) errMsg); #endif   }   pDb=NULL;  }  return true; } From: Dan To: General Discussion of SQLite Database Sent: Friday, February 13, 2009 9:14:20 AM Subject: Re: [sqlite] sqlite3_finalize (pStmt=0x28) at ../src/vdbeapi.c:204 On Feb 13

Re: [sqlite] sqlite3_finalize (pStmt=0x28) at ../src/vdbeapi.c:204

2009-02-13 Thread Dan
___ > From: Dan > To: General Discussion of SQLite Database > Sent: Thursday, February 12, 2009 9:03:12 PM > Subject: Re: [sqlite] sqlite3_finalize (pStmt=0x28) at ../src/ > vdbeapi.c:204 > > > On Feb 13, 2009, at 11:49 AM, Joanne Pham wrote: >

Re: [sqlite] sqlite3_finalize (pStmt=0x28) at ../src/vdbeapi.c:204

2009-02-13 Thread Joanne Pham
d. JP From: Dan To: General Discussion of SQLite Database Sent: Thursday, February 12, 2009 9:03:12 PM Subject: Re: [sqlite] sqlite3_finalize (pStmt=0x28) at ../src/vdbeapi.c:204 On Feb 13, 2009, at 11:49 AM, Joanne Pham wrote: > Hi All, > We have an app

Re: [sqlite] sqlite3_finalize (pStmt=0x28) at ../src/vdbeapi.c:204

2009-02-12 Thread Dan
On Feb 13, 2009, at 11:49 AM, Joanne Pham wrote: > Hi All, > We have an application is used SQLite 3.5.9 and our program is > crashed on > "sqlite3_finalize (pStmt=0x28) at ../src/vdbeapi.c:204" and I don't > know why it crashed on this line. > Do you have any information about why it is cras

[sqlite] sqlite3_finalize (pStmt=0x28) at ../src/vdbeapi.c:204

2009-02-12 Thread Joanne Pham
Hi All, We have an application is used SQLite 3.5.9 and our program is crashed on "sqlite3_finalize (pStmt=0x28) at ../src/vdbeapi.c:204" and I don't know why it crashed on this line. Do you have any information about why it is crashed on sqlite3_finalize at 204 vdbeapi. Thanks in advance for yo

Re: [sqlite] sqlite3_finalize vs sqlite3_closed

2008-05-15 Thread Igor Tandetnik
Joanne Pham <[EMAIL PROTECTED]> wrote: > Should Iuse sqlite3_finalize or sqlite3_closed after I am done with > reading/write to the database. You should call sqlite3_finalize on all prepared statements, then sqlite3_close on the database handle. Igor Tandetnik ___

[sqlite] sqlite3_finalize vs sqlite3_closed

2008-05-15 Thread Joanne Pham
Hi All,  Should Iuse sqlite3_finalize or sqlite3_closed after I am done with reading/write to the database. Thanks, JP ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] sqlite3_finalize(pReadStmt); and sqlite3_close(pDB);

2008-04-03 Thread D. Richard Hipp
On Apr 3, 2008, at 5:09 PM, Joanne Pham wrote: > Hi All, > Should we always call sqlite3_finalize(pReadStmt); and > sqlite3_close(pDB) after we have done with read/write to database. > Or sqlite3_finalize(pReadStmt) is good enough. > Please advice what is the sequence of statement that we shou

[sqlite] sqlite3_finalize(pReadStmt); and sqlite3_close(pDB);

2008-04-03 Thread Joanne Pham
Hi All, Should we always call sqlite3_finalize(pReadStmt); and sqlite3_close(pDB) after we have done with read/write to database. Or sqlite3_finalize(pReadStmt) is good enough. Please advice what is the sequence of statement that we should call after we are done with database activities(read/wri

[sqlite] sqlite3_finalize() thread-safety (was: Re: [sqlite] Direct use of SQLite btree functions / performance)

2006-04-19 Thread Felix Schwarz
Am 19.04.2006 um 15:31 schrieb [EMAIL PROTECTED]: Felix Schwarz <[EMAIL PROTECTED]> wrote: Hi, I have just discovered these old message on the SQLite Yahoo! Group: http://groups.yahoo.com/group/sqlite/message/2115 http://groups.yahoo.com/group/sqlite/message/2117 This does sound very intere