Home » U++ Library support » U++ SQL » Fix to Sqlite3Session::Open
Fix to Sqlite3Session::Open [message #19915] |
Sun, 01 February 2009 19:18 |
Novo
Messages: 1358 Registered: December 2006
|
Ultimate Contributor |
|
|
Explanation.
sqlite3_open initializes database argument even if it cannot open database. So, it is incorrect to use NULL == db to check whether database was opened or not.
-
Attachment: sqlite3.diff
(Size: 1.27KB, Downloaded 285 times)
Regards,
Novo
|
|
|
|
Re: Fix to Sqlite3Session::Open [message #19926 is a reply to message #19919] |
Tue, 03 February 2009 05:23 |
Novo
Messages: 1358 Registered: December 2006
|
Ultimate Contributor |
|
|
luzr wrote on Mon, 02 February 2009 04:56 |
Should not be the handle closed in Close and opened set to false again?
|
That will work too. It is just less efficient. sqlite3_open allocates a bunch of internal structures, which will be freed and allocated again in case sqlite3_close.
Regards,
Novo
|
|
|
Goto Forum:
Current Time: Mon Apr 29 06:06:14 CEST 2024
Total time taken to generate the page: 0.02328 seconds
|