sp problem
Hi there,
I am strugling with this problem for sometimes so any help will be greatly appreciated.
I am using sp in SQL2000 to populate two dynamic drop-down list
based on the ProductID query.
The page works fine and it does populate the lists, but it stops working if I uncomment the
on error resume next
when it gets to rsSUK.Requery.
error message:
spSUK expects @ProductID which was not supplied.
--------
<%
rsSUK.MoveNext()
Wend
If (rsSUK.CursorType > 0) Then
rsSUK.MoveFirst
Else
rsSUK.Requery
End If
%>
---------
if I change that to
-----------
<%
rsSUK.MoveNext()
Wend
If (rsSUK.CursorType > 0) Then
rsSUK.MoveFirst
Else
rsSUK = spSUK.Execute
End If
%>
-----------
it works fine, but I don't want to execute the spSUK again.
bellow is the spSUK:
<%
Dim spSUK__ProductID
spSUK__ProductID = "0"
if ProductID <> "" then spSUK__ProductID = ProductID
%>
<%
set spSUK = Server.CreateObject("ADODB.Command")
spSUK.ActiveConnection = MM_storeSQL_STRING
spSUK.CommandText = "dbo.spSUK"
spSUK.Parameters.Append spSUK.CreateParameter("@RETURN_VALUE", 3, 4)
spSUK.Parameters.Append spSUK.CreateParameter("@ProductID", 3, 1,4,spSUK__ProductID)
spSUK.CommandType = 4
spSUK.CommandTimeout = 0
spSUK.Prepared = true
set rsSUK = spSUK.Execute
rsSUK_numRows = 0
%>
|