Wrox Programmer Forums
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) 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 6th, 2004, 02:44 AM
Authorized User
 
Join Date: Jun 2003
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dynamic drop-down list

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

%>
 
Old July 8th, 2004, 04:58 PM
Authorized User
 
Join Date: Jun 2003
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Anybody there?
 
Old July 8th, 2004, 05:58 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

I think you're better off posting this in an ASP or SQL Server forum, depending on where you think the problem lies.
AFAICS, this does not have much to do with Dreamweaver. If you post in another topic, you'll probably get a faster answer.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
hyperlinks in a dynamic drop down list matti ASP.NET 1.0 and 1.1 Basics 1 October 15th, 2008 10:31 AM
Drop down list carumuga Classic ASP Basics 1 February 6th, 2007 02:37 PM
drop down list values based on another drop down noor ASP.NET 1.0 and 1.1 Basics 3 July 5th, 2005 09:57 AM
Dynamic drop down list bart.moons Classic ASP Databases 9 January 25th, 2005 10:05 AM





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