Exemple #1
0
 public static void DropAccess()
 {
     try
     {
         MyMeans.AccessLink();
         string       strInsert = " delete * from ECD_ID ";
         OleDbCommand inst      = new OleDbCommand(strInsert, Conn);
         inst.ExecuteNonQuery();
         MyMeans.AccessBreak();
     }
     catch
     {
         log.Info("ID数据清除出错!");
         MyMeans.AccessBreak();
     }
 }
Exemple #2
0
 public static void InsertAccess(string ID, string Description, string TBytes, string Data, string Value)
 {
     try
     {
         MyMeans.AccessLink();
         string       strInsert = " INSERT INTO [ECD_ID] ([ID],[描述],[类型长度],[数据],[ASCII值]) VALUES ( '" + ID + "','" + Description + "','" + TBytes + "','" + Data + "','" + Value + "')";
         OleDbCommand inst      = new OleDbCommand(strInsert, Conn);
         inst.ExecuteNonQuery();
         MyMeans.AccessBreak();
     }
     catch
     {
         log.Info("ID数据储存出错!");
         MyMeans.AccessBreak();
     }
 }
Exemple #3
0
        /// <summary>
        /// 返回DataSet 数据
        /// </summary>
        /// <returns></returns>
        public static DataSet   GetEcuTrip(String EcuVersion)
        {
            DataSet ds = new DataSet();

            try
            {
                MyMeans.AccessLink();
                String           select = "SELECT * FROM  ECU13Tp  where EcuVersion='" + EcuVersion + "'";
                OleDbDataAdapter da     = new OleDbDataAdapter(select, Conn);
                da.Fill(ds, "Table1_1");
                MyMeans.AccessBreak();
            }
            catch (Exception e) {
                log.Info("read ecu tp  by version is error" + e.Message);
                MyMeans.AccessBreak();
            }
            return(ds);
        }
Exemple #4
0
 public static void DropDTC()
 {
     try
     {
         MyMeans.AccessLink();
         string       strInsert = " delete * from DTC ";
         OleDbCommand inst      = new OleDbCommand(strInsert, Conn);
         inst.ExecuteNonQuery();
         strInsert = " ALTER TABLE  DTC ALTER COLUMN ID COUNTER (1,1)";
         inst      = new OleDbCommand(strInsert, Conn);
         inst.ExecuteNonQuery();
         MyMeans.AccessBreak();
     }
     catch
     {
         log.Info("DTC数据库清除出错!");
         MyMeans.AccessBreak();
     }
 }
Exemple #5
0
 public static void InsertTrip(string Name1, string Name2, string Name3, string Name4, string Name5,
                               string Name6, string Name7, string Name8, string Name9, string Name10)
 {
     try
     {
         MyMeans.AccessLink();
         string strInsert = " INSERT INTO [Trip] ([Name1],[Name2],[Name3],[Name4],[Name5],[Name6],[Name7],[Name8],[Name9],[Name10]) VALUES ( '"
                            + Name1 + "','" + Name2 + "','" + Name3 + "','" + Name4 + "','" + Name5 + "','" + Name6 + "','" + Name7 + "','" + Name8
                            + "','" + Name9 + "','" + Name10 + "')";
         OleDbCommand inst = new OleDbCommand(strInsert, Conn);
         inst.ExecuteNonQuery();
         MyMeans.AccessBreak();
     }
     catch
     {
         log.Info("行程记录数据库储存出错!");
         MyMeans.AccessBreak();
     }
 }