CreateFile() static public method

Creates a database file. This just creates a zero-byte file which SQLite will turn into a database when the file is opened properly.
static public CreateFile ( string databaseFileName ) : void
databaseFileName string The file to create
return void
コード例 #1
0
 public static void Create(string dbpath, params string[] sql)
 {
     if (!File.Exists(dbpath))
     {
         try{
             SQLiteConnection.CreateFile(dbpath);
             Command(dbpath, sql);
         }
         catch (Exception) {
         }
     }
     // CREATE TABLE wins(id INTEGER PRIMARY KEY AUTOINCREMENT,[IDCardNo] VARCHAR (50),endtime TimeStamp NOT NULL DEFAULT CURRENT_TIMESTAMP);
 }