Example #1
0
 /// <summary>
 /// Open database
 /// </summary>
 /// <returns>Returns 'true' if operation was successful</returns>
 public bool OpenDb()
 {
     bool result = false;
     if (!String.IsNullOrWhiteSpace(_name))
     {
         _dbConnection = new SQLiteConnection(String.Format("Data Source={0};Version=3;",
                                                            _name));
         _dbConnection.Open();
         SQLiteErrorCode code = _dbConnection.ResultCode();
         result = (code == SQLiteErrorCode.Ok);
     }
     return result;
 }