title: Disable SQLite automatic Database creation - C#
body: <p>I use successfully a try - catch method to test connection of C# with common databases.
  However, <strong>in case of SQLite, when the database is not detected, it creates a new one, which is unwanted in my case</strong>. &quot;When you connect to an SQLite database file that does not exist, SQLite automatically creates the new database for you&quot;</p>
  <pre><code>SQLiteDataAdapter ad;
          DataTable dt = new DataTable();
          try
          {
              sqlite = new SQLiteConnection(&quot;Data Source=C:/Users/SKUL/Desktop/db/PatHist.db&quot;);
              SQLiteCommand cmd;
              sqlite.Open();  //Initiate connection to the db
              cmd = sqlite.CreateCommand();
              //-----------------
            
              picConnectionStatus.Image = Properties.Resources.icons8_database_view_64;
              lblConnectionEstablished.Text = &quot;Connection Established&quot;;
  
              sqlite.Close();
             
          }
          catch (Exception ex)
          {
              picConnectionStatus.Image = Properties.Resources.icons8_delete_database_64;
              lblConnectionEstablished.Text = &quot;Connection Error&quot;;
              lblConnectionEstablished.ForeColor = System.Drawing.Color.Red;
             
          }
  </code></pre>
  <p>What is needed is to disable some way the automatic database creating and trigger the &quot;catch&quot; routine</p>