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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot read return value in stored proc.

Status
Not open for further replies.

whatisahandle

Programmer
Jul 26, 2001
18
CA
Hi,

I have some ASP code which works fine on an SQL7 database but not on SQL2000. It looks like this:

' --------------------------------
Set cmdLoad = Server.CreateObject("ADODB.Command")
cmdLoad.CommandText = "{? = call usr_GetCountProduitCatalogue(?,?)}"

cmdLoad.Parameters.Refresh
cmdLoad.Parameters("@NoCatalogue") = pintID
cmdLoad.Parameters("@NoCatDate") = rstLoad("NoCatDate")
cmdLoad.execute

lngCountProduit = cmdLoad.Parameters.Item("RETURN_VALUE").value
' --------------------------------

I get this error:

ADODB.Parameters error '800a0cc1'

Item cannot be found in the collection corresponding to the requested name or ordinal.

The problem is the "RETURN_VALUE" parameter is not recognized.
But with:
cmdLoad.Parameters.Item(0).value
it works fine.

Anyone ever see this ?

Thank,

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top