Exemplo n.º 1
0
 /// <summary>
 /// Opens database.
 /// </summary>
 /// <param name="DatabaseName">Name of database file</param>
 public void OpenDatabase(String DatabaseName)
 {
     // opens database
     if (CSSQLite.sqlite3_open(DatabaseName, ref db) != CSSQLite.SQLITE_OK)
     {
         // if there is some error, database pointer is set to 0 and exception is throws
         db = null;
         throw new Exception("Error with opening database " + DatabaseName + "!");
     }
 }