[thelist] Calling a sproc from VB

Ken Schaefer ken at adOpenStatic.com
Tue Feb 3 17:07:30 CST 2004


Don't take out the last two parameters - just take out the last one.

<%
With Cmd
    .Parameters.Append _
        .CreateParameter("@ResultStr", adVarChar, adParamOutput, 5000)
End With
%>

(hopefully there won't be much wrapping)

Cheers
Ken


----- Original Message ----- 
From: "Tab Alleman" <Tab.Alleman at MetroGuide.com>
To: <thelist at lists.evolt.org>
Sent: Wednesday, February 04, 2004 1:35 AM
Subject: RE: [thelist] Calling a sproc from VB


Ken Schaefer wrote:
> After calling cmd.Execute you need to update the value of your
> spResultStr variable to reflect the value that the output parameter
> currently holds: 
> 
> <%
> spResultStr = cmd.Parameters("@ResultStr").Value
> %>

Yep, this was it...thanks.

> 
> Also, you don't need spResultStr in:
> .Parameters.Append cmd.CreateParameter("@ResultStr", adVarChar,
> adParamOutput, 5000, spResultStr)
> 

I tried taking off the last 2 parameters, and it gave me a "missing
parameters" error, so I put them back.  Did I need to leave in the
commas?  Like:  

> .Parameters.Append cmd.CreateParameter("@ResultStr", adVarChar,
> adParamOutput, , )




More information about the thelist mailing list