Hi all,
I have to call a stored procedure from my VB.NET code , the procedure returns a value(int)
Dim param As OleDbParameter
cmd.Connection = cn 'cmd is oledbcommand object
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "searchitem"
param paramReturnValue = new oledbParameter()
paramReturnValue.ParameterName = "@return_value";
paramReturnValue.oledbType = SqlDbType.Int;
paramReturnValue.Direction = ParameterDirection.ReturnValue;
but I am getting an error on my 5th line that expression is not a method.
Can anyone tell me what is going wrong in my code.
Thanks,
-V
I have to call a stored procedure from my VB.NET code , the procedure returns a value(int)
Dim param As OleDbParameter
cmd.Connection = cn 'cmd is oledbcommand object
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "searchitem"
param paramReturnValue = new oledbParameter()
paramReturnValue.ParameterName = "@return_value";
paramReturnValue.oledbType = SqlDbType.Int;
paramReturnValue.Direction = ParameterDirection.ReturnValue;
but I am getting an error on my 5th line that expression is not a method.
Can anyone tell me what is going wrong in my code.
Thanks,
-V