Here is my code.
Also if I use ExecuteUpdate I am getting the following error.Code:try { OdbcCommand m_cmdStoredProc = new OdbcCommand(); m_cmdStoredProc.CommandType = CommandType.StoredProcedure; m_cmdStoredProc.CommandText = storProc; m_cmdStoredProc.CommandTimeout = 0; m_oConn.Open(); m_cmdStoredProc.Connection = m_oConn; try { int count = 0; count = m_cmdStoredProc.ExecuteUpdate(); m_oLog.Append("\tTRACE\tSUCCESSFULLY EXECUTED STORED PROCEDURE\t"); bReturn = true; } catch (Exception ex) { m_oLog.Append("\tSQL EXCEPTION WITH STORED PROC\t" + ex.Message); bReturn = false; } m_oConn.Close(); } catch(System.Data.SqlClient.SqlException e) { //usage log error, if we return false from this function our code should already take care of it. m_oLog.Append("\tSQL EXCEPTION\t" + e.Message); }
'System.Data.Odbc.OdbcCommand' does not contain a definition for 'ExecuteUpdate'




Reply With Quote