Hi Expert,
Kindly highlighten me how to set execute statement in the end of sql,
Attach is my code
Kindly highlighten me how to set execute statement in the end of sql,
Attach is my code
Code:
private void InsertintoDB() { string strSQL = ""; string strDBType = System.Configuration.ConfigurationManager.AppSettings["DBType"]; string strConn = System.Configuration.ConfigurationManager.AppSettings["DB_CONNECTION_STRING1"].ToString(); string strInsertTableName_Sql = "CIMMGR.[dbo].ANSDATA"; string strInsertTableName_Ora = "CIMMGR.ANSDATA"; if (strDBType == "MSSQL") { strSQL = "Insert into " + strInsertTableName_Sql + "(EQID,CHAMBERID,MEMO,MESSAGE,REPORTTIME,PARAMETERID,RULEID,ALGORITHMVALUE,RULENAME,WAFER,ALARMACTION,RUNREUSLT)" + " Values(" + this.m_strEQID + "," + this.m_strChamberID + "," + this.m_strDescription + "," + this.m_strMessageText + "," + this.m_parameterId + "," + this.m_ruleId + "," + this.m_RunResult + "," + this.m_algorithmValue + "," + this.m_ruleName + "," + this.m_wafer + "," + this.m_strAlarmAction + "," + this.m_strProcessID + ")"; } else { strSQL = "Insert into " + strInsertTableName_Ora + "(EQID,CHAMBERID,MEMO,MESSAGE,REPORTTIME,PARAMETERID,RULEID,ALGORITHMVALUE,RULENAME,WAFER,ALARMACTION,RUNREUSLT)" + " Values(" + this.m_strEQID + "," + this.m_strChamberID + "," + this.m_strDescription + "," + this.m_strMessageText + "," + this.m_parameterId + "," + this.m_ruleId + "," + this.m_RunResult + "," + this.m_algorithmValue + "," + this.m_ruleName + "," + this.m_wafer + "," + this.m_strAlarmAction + "," + this.m_strProcessID + ")"; this.logger.LogMsg(@"[ANS] InsertIntoDB", true); this.logger.LogMsg(@"[ANS] [SQL]: Insert into " + strInsertTableName_Ora + "(EQID,CHAMBERID,MEMO,MESSAGE,REPORTIME,PARAMETERID,RULEID,ALGORITHMVALUE,RULENAME,WAFER,ALARMACTION,VIEWEVENT)" + " Values(" + this.m_strEQID + "," + this.m_strChamberID + "," + this.m_strDescription + "," + this.m_strMessageText + "," + this.m_parameterId + "," + this.m_ruleId + "," + this.m_RunResult + "," + this.m_algorithmValue + "," + this.m_ruleName + "," + this.m_wafer + "," + this.m_strAlarmAction + "," + this.m_strProcessID + ")",true); //return strSQL; } } //Kiru 1.8.2012 End #endregion
Comment