Edward Rush
October 11th, 2003, 09:26 AM
I am getting this error:
System.Data.SqlClient.SqlException: Could not find stored procedure 'dt_pwdUpdate'. at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, etc...
However, I can run a SQL statement against the source and it works. When I call the same statement stored in a stored procedure the error occurs.
'///////////////////////////////
'This code works. NET_ADO is my ADO.NET Wrapper
Public Function executeSQl(ByRef con As NET_ADO, ByRef e As instructorArgs) as integer
Dim encrypt As New erCrypt
Dim pwd As String = encrypt.comHash(e.Password)
con.commandObj.CommandText = "UPDATE tblpwd SET fldPwd = @pwd WHERE fldID = @id"
con.commandObj.Parameters.Add("@id", 1000)
con.commandObj.Parameters.Add("@pwd", pwd)
Return con.commandObj.ExecuteNonQuery
End Function
'///////////////////////////
'This code does not work
Public Function dt_pwdUpdate(ByRef con As NET_ADO, ByRef e As instructorArgs) As Integer
Dim encrypt As New erCrypt
Dim pwd As String = encrypt.comHash(e.Password)
con.commandObj.CommandText = "dt_pwdUpdate"
con.commandObj.CommandType = System.Data.CommandType.StoredProcedure
con.commandObj.Parameters.Add("@param_ID", 1000)
con.commandObj.Parameters.Add("@param_PWD", pwd)
Return con.commandObj.ExecuteNonQuery
End Function
System.Data.SqlClient.SqlException: Could not find stored procedure 'dt_pwdUpdate'. at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, etc...
However, I can run a SQL statement against the source and it works. When I call the same statement stored in a stored procedure the error occurs.
'///////////////////////////////
'This code works. NET_ADO is my ADO.NET Wrapper
Public Function executeSQl(ByRef con As NET_ADO, ByRef e As instructorArgs) as integer
Dim encrypt As New erCrypt
Dim pwd As String = encrypt.comHash(e.Password)
con.commandObj.CommandText = "UPDATE tblpwd SET fldPwd = @pwd WHERE fldID = @id"
con.commandObj.Parameters.Add("@id", 1000)
con.commandObj.Parameters.Add("@pwd", pwd)
Return con.commandObj.ExecuteNonQuery
End Function
'///////////////////////////
'This code does not work
Public Function dt_pwdUpdate(ByRef con As NET_ADO, ByRef e As instructorArgs) As Integer
Dim encrypt As New erCrypt
Dim pwd As String = encrypt.comHash(e.Password)
con.commandObj.CommandText = "dt_pwdUpdate"
con.commandObj.CommandType = System.Data.CommandType.StoredProcedure
con.commandObj.Parameters.Add("@param_ID", 1000)
con.commandObj.Parameters.Add("@param_PWD", pwd)
Return con.commandObj.ExecuteNonQuery
End Function