예제 #1
0
        public int InsertNewErrorDetails(
            string ID,
            DateTime Time,
            string Component,
            string Type
            )
        {
            Table.ErrorDetails resultTbl = new Table.ErrorDetails();
            string             cmd       = string.Format("INSERT INTO {0} ({1}) values({2});",
                                                         resultTbl.TableName,
                                                         // --------------
                                                         resultTbl.ID + "," +
                                                         resultTbl.Time + "," +
                                                         resultTbl.Component + "," +
                                                         resultTbl.Type,

                                                         //--------------
                                                         "\'" + ID + "\'," +
                                                         "\'" + Time.ToString("yyyy-MM-dd HH:mm:ss") + "\'," +
                                                         "\'" + Component + "\'," +
                                                         "\'" + Type + "\'"
                                                         );

            return(mCtl.ExecuteCmd(mConn, cmd));
        }
예제 #2
0
        public void InitErrorDetailsTbl()
        {
            Table.ErrorDetails imgTbl = new Table.ErrorDetails();
            string             cmd    = string.Format("CREATE TABLE IF NOT EXISTS {0} ({1});",
                                                      imgTbl.TableName,
                                                      imgTbl.ID + " TEXT," +
                                                      imgTbl.Time + " TEXT," +
                                                      imgTbl.Component + " TEXT," +
                                                      imgTbl.Type + " TEXT"
                                                      );

            mCtl.ExecuteCmd(mConn, cmd);
        }