I was trying to execute a a stored procedure from VB application and its giving me some error."Item canot be found in the collection corressponding to the requested name or ordinal".
Is there anything Iam missing.....Please help me with that.....
Dim cmd As ADODB.Command
Dim prm As ADODB.Parameter
Dim rs As ADODB.Recordset
Call Connect2Sourcedb.connect_dm_qa
Set rsActiveLoans = New ADODB.Recordset
Set cmd = New ADODB.Command
cmd.CommandText = "usp_resale_s;1"
MsgBox cmd.CommandText
cmd.CommandType = CommandTypeEnum.adCmdStoredProc
Set prm = cmd.CreateParameter("resale_number", adVarChar, adParamInput, 13, "0189167")
cmd.Parameters.Append prm
Set cmd.ActiveConnection = Connect2Sourcedb.conn
MsgBox cmd.ActiveConnection
Set rs = cmd.Execute
MsgBox rs.Fields("0").Value
Is there anything Iam missing.....Please help me with that.....
Dim cmd As ADODB.Command
Dim prm As ADODB.Parameter
Dim rs As ADODB.Recordset
Call Connect2Sourcedb.connect_dm_qa
Set rsActiveLoans = New ADODB.Recordset
Set cmd = New ADODB.Command
cmd.CommandText = "usp_resale_s;1"
MsgBox cmd.CommandText
cmd.CommandType = CommandTypeEnum.adCmdStoredProc
Set prm = cmd.CreateParameter("resale_number", adVarChar, adParamInput, 13, "0189167")
cmd.Parameters.Append prm
Set cmd.ActiveConnection = Connect2Sourcedb.conn
MsgBox cmd.ActiveConnection
Set rs = cmd.Execute
MsgBox rs.Fields("0").Value