예제 #1
0
        private void AddGPSHistoryDataToOracle(string strDEVICE_BM, int [] IDS)
        {
            string strTableName = "T_BUSI_POS_HIST";

            try
            {
                Point2Ds pt2Ds = GetPoint2DsFromLine(IDS);
                if (pt2Ds.Count > 0)
                {
                    string strPoints = JSONHelper.ObjectToJSON(pt2Ds);
                    string strDT_ST  = "to_date('2013-09-10','yyyy-mm-dd')";
                    string strDT_ET  = "to_date('2013-10-10','yyyy-mm-dd')";

                    string strSQL = string.Format("insert into {0}(ID,DEVICE_BM,REC_DATETIME_ST,REC_DATETIME_ET,REC_POS_CONTENT) values(get_guid(),'{1}',{2},{3},empty_blob())",
                                                  strTableName,
                                                  strDEVICE_BM,
                                                  strDT_ST,
                                                  strDT_ET);
                    string strROWID = DbHelperOra.ExecuteOracleSql(DbHelperOra.connectionString_172, strSQL);
                    string strWhere = string.Format("rowid = '{0}'", strROWID);
                    DbHelperOra.RwiteBlobToTable(DbHelperOra.connectionString_172, strTableName, "REC_POS_CONTENT", strWhere, strPoints);
                }
            }
            catch (SystemException sysEx)
            { }
        }