the sqlite3_close() <--- needs one argument if i pass sqlite3_close(NULL) it actually closes again a closed connection ?
I cant find if the certain sqlite3 *ppDB is open or closed :/ if(ppDB){ //is open }else{ //is closed } It returns always that the ppDB is open in the above function ________________________________________ From: sqlite-users-bounces at mailinglists.sqlite.org <sqlite-users-bounces at mailinglists.sqlite.org> on behalf of Simon Slavin <slav...@bigfraud.org> Sent: Tuesday, March 1, 2016 6:50 PM To: SQLite mailing list Subject: Re: [sqlite] How to check if connection to main database is still open or closed before new query ? On 1 Mar 2016, at 4:47pm, a a <NoCos30 at hotmail.com> wrote: > Nope the previous was errored it doesn`t actually check it if the ppDB is > allready closed :/ > It works only if it is open and not closed otherwise if sqlite3_close(ppDB) > was previously called it sees it as open again sqlite3_close() ignores connections which are already closed. If you call it and pass it null, it will return, doing nothing but returning no error message. So it is safe to issue sqlite3_close() on one connection. Simon. _______________________________________________ sqlite-users mailing list sqlite-users at mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users