I Get the following Error
================ Error ===============================
Procedure 'GetCetgoriesOrProducts' expects parameter '@CategoryID', which
was not supplied.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: Procedure
'GetCetgoriesOrProducts' expects parameter '@CategoryID', which was not
supplied.
Source Error:
Line 52: MyCmd.Parameters.Add(Par_ResultType)
Line 53:
Line 54: Dim Dr As System.Data.OleDb.OleDbDataReader =
MyCmd.ExecuteReader
Line 55:
Line 56: If Dr.HasRows Then
================================================== ==
================== code ==============================
Dim Cn As New System.Data.OleDb.OleDbConnection
Cn.ConnectionString = " Provider=SQLOLEDB;server=172.17.20.2;Initial
Catalog=Sfbulbs;uid=sa;pwd=homer27;"
'ConfigurationSettings.AppSettings("ErrorLogConnSt ring")
Cn.Open()
Dim MyCmd As New System.Data.OleDb.OleDbCommand
MyCmd.Connection = Cn
MyCmd.CommandText = "GetCetgoriesOrProducts"
MyCmd.CommandType = CommandType.StoredProcedure
Dim Par_CategoryID As New System.Data.OleDb.OleDbParameter
Par_CategoryID.ParameterName = "@CategoryID"
Par_CategoryID.DbType = DbType.Int32
Par_CategoryID.Value = Request("CategoryID")
Par_CategoryID.Direction = ParameterDirection.Input
Dim Par_ResultType As New System.Data.OleDb.OleDbParameter
Par_ResultType.DbType = DbType.String
Par_ResultType.ParameterName = "@SearchResultType"
Par_ResultType.Direction = ParameterDirection.Output
Par_ResultType.Size = 50
'Dim sampParm As New System.Data.OleDb.OleDbParameter
'sampParm.ParameterName = "RETURN_VALUE"
'sampParm.OleDbType = OleDb.OleDbType.BigInt
'sampParm.Direction = ParameterDirection.ReturnValue
'MyCmd.Parameters.Add(sampParm)
MyCmd.Parameters.Add(Par_CategoryID)
MyCmd.Parameters.Add(Par_ResultType)
Dim Dr As System.Data.OleDb.OleDbDataReader = MyCmd.ExecuteReader
If Dr.HasRows Then
Do While Dr.Read
Response.Write(Dr(0) & "---" & Dr(1))
Loop
Dr.Close()
End If
================================================== ==