Running A Stored Procedure from .NET
Hey All,
Here is my code:
Code:
odcQuote.Open()
odcmQuote = New Odbc.OdbcCommand
odpQuote = New Odbc.OdbcParameter
odcmQuote.Connection = odcQuote
odcmQuote.CommandText = strSPName
odcmQuote.CommandType = CommandType.StoredProcedure
odpQuote.ParameterName = strSPParamName
odpQuote.OdbcType = Odbc.OdbcType.Int
odpQuote.Value = intParamVal
odpQuote.Direction = ParameterDirection.Input
odcmQuote.Parameters.Add(odpQuote)
odcmQuote.ExecuteNonQuery()
odcQuote.Close()
I'm getting an Error on the ExecuteNonQuery command:
"The Stored Procedure *whatever* requires a parameter named @intQotID"
Which is true, but that parameter I add is definatley named "@intQotID". Any idea why it isn't recognizing it?
Thanks!
--Ben