Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 9th, 2004, 01:52 AM
Authorized User
 
Join Date: Jun 2003
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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

%>





Similar Threads
Thread Thread Starter Forum Replies Last Post
exec sp within another sp collie SQL Server 2000 1 December 22nd, 2004 05:46 AM
Upgrade from SQL7 to SQL2000 - Problem with an SP paulymac SQL Server 2000 2 December 10th, 2004 05:20 AM
SP used in a SP Mitch SQL Server 2000 16 October 28th, 2003 12:59 PM
SP with Results sidneyfuerte Pro VB 6 4 September 9th, 2003 01:48 PM
Can a SP run another SP as sa? dbradley SQL Server 2000 0 July 17th, 2003 08:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.