コード例 #1
0
 // open database and set status -- cannot be used except to get error code
 bool Open(string path)
 {
     _lastresult = (Result)sqlite3_open(path, out _dbhandle);
     IsOpen      = (_lastresult == Result.OK);
     if (IsOpen)
     {
         _begin = BeginStatement();
         _begin.Prepare("BEGIN TRANSACTION;");
         _commit = BeginStatement();
         _commit.Prepare("COMMIT;");
         _rollback = BeginStatement();
         _rollback.Prepare("ROLLBACK;");
     }
     return(CheckOk());
 }