Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP error, Urgent Help Needed!!

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have been battling this error for 3 days.
I have baffled.
I am calling a stored proc via asp but I keep getting an error:

Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
/EmpDB/call_stored_proc.asp, line 65

which is this line:
<% For Each param In oCmd.Parameters %>

Any help would be greatly appreciated.
Below is the entire code.

<%

sub saveData

'dim custID, cTopic, cName, cEmail, cHttp, cBody
dim custID
dim pCustID, pTopic, pName, pEmail, pHttp, pBody
dim pAction, pMessage

custID = Request.Form( &quot;id&quot; )
cTopic = Request.Form( &quot;topic&quot; )
cName = Request.Form( &quot;name&quot; )
cEmail = Request.Form( &quot;email&quot; )
cHttp = Request.Form( &quot;http&quot; )
cBody = Request.Form( &quot;body&quot; )

Set oCmd = Server.CreateObject(&quot;ADODB.Command&quot;)
oCmd.ActiveConnection = getDBConnection()
oCmd.CommandText = &quot;sel_record&quot;
oCmd.CommandType = 4

Set pCustID = oCmd.CreateParameter(&quot;custID&quot;,131,1,30,custID)
oCmd.Parameters.Append pCustID

Set pTopic = oCmd.CreateParameter(&quot;cTopic&quot;,200,2,30,cTopic)
oCmd.Parameters.Append pTopic

Set pName = oCmd.CreateParameter(&quot;cName&quot;,200,2,30,cName)
oCmd.Parameters.Append pName

Set pEmail = oCmd.CreateParameter(&quot;cEmail&quot;,200,2,30,cEmail)
oCmd.Parameters.Append pEmail

Set pHttp = oCmd.CreateParameter(&quot;cHttp&quot;,200,2,30,cHttp)
oCmd.Parameters.Append pHttp

Set pBody = oCmd.CreateParameter(&quot;cBody&quot;,200,2,30,cBody)
oCmd.Parameters.Append pBody

Set pAction = oCmd.CreateParameter(&quot;ioAction&quot;,131,3,50,0)
oCmd.Parameters.Append pAction

Set pMessage = oCmd.CreateParameter(&quot;ioMessage&quot;,200,3,50,&quot;&quot;)
oCmd.Parameters.Append pMessage

oCmd.Execute

if ( oCmd(&quot;ioAction&quot;) <> 0 ) then
Response.Write( oCmd(&quot;ioMessage&quot;) )
end if

end sub

%>

<Table Border=1>
<TR>
<TD><B>Topic</B></TD>
<TD><B>Name</B></TD>
<TD><B>Email</B></TD>
<TD><B>Http</B></TD>
<TD><B>Body</B></TD>

</TR>
<% For Each param In oCmd.Parameters %>
<TR>
<TD><%= param.topic %></TD>
<TD><%= param.name %></TD>
<TD><%= param.email %></TD>
<TD><%= param.http %></TD>
<TD><%= param.body%></TD>
</TR>
<%
Next
%>
 
thanks again Nouman and Hemmeijer.
You all have been very kind.
I will try and it work from here on.
 
Dear Sim
Let me know if it works for you..i know u could do it..
Regards
Nouman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top