title: Check to see if SQLite database connection is still open
body: <p>how can you check to see if a database is still open?</p>
  
  <p>I am using this to open it:</p>
  
  <pre><code>   if (sqlite3_open([dbPath UTF8String], &amp;database1) == SQLITE_OK) {
  }
  </code></pre>
  
  <p>I assume it would be something like the following, but when I think the database is open it shows as closed:  (Am I on the right track or completely wrong here?) :</p>
  
  <pre><code>if(sqlite3_open([dbPath UTF8String], &amp;database1)){
  
      NSLog(@"DATABASE OPEN?");
  
  }else{
  
      NSLog(@"DATABASE CLOSED?");
  
  
  }
  </code></pre>