Thank you Simon indeed what i was looking for 

________________________________________
From: sqlite-users-bounces at mailinglists.sqlite.org <sqlite-users-bounces at 
mailinglists.sqlite.org> on behalf of Simon Slavin <[email protected]>
Sent: Tuesday, March 1, 2016 6:17 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:02pm, a a <NoCos30 at hotmail.com> wrote:

> I am trying to find if there is a return value of true false or anything that 
> can tell me that a connection to sqlite database is open or close
>
> Can you tell me which function is appropiate for this reason ?

If I understand correctly, SQLite sets the value of a database handle to NULL 
when it successfully closes the connection.  So you should be able to tell if 
the handle is 'in use' without any other API calls, just by doing

if (ppDb) {
    // it's open
  } else {
    // it's closed
}

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users at mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to