Beispiel #1
0
 public void Start()
 {
     try
     {
         log.InfoFormat("Start {0}   {1}", AppDomain.CurrentDomain.BaseDirectory, root);
         string dbpath = Path.Combine(root, "sqlite.db");
         using (SQLiteSession sqlite = new SQLiteSession(dbpath))
         {
             string tn = DateTime.Now.ToString("yyyyMMddHHmmss");
             sqlite.Execute($"CREATE TABLE table_{tn} (id  INTEGER PRIMARY KEY AUTOINCREMENT, iii INTEGER,ddd DATE DEFAULT((date('now', 'localtime'))) NOT NULL);");
         }
     }
     catch (Exception e)
     {
         log.ErrorFormat("异常: {0} {1}", e.Message, e.StackTrace);
     }
 }