Advertisement

02.25.2007 at 04:47AM PST, ID: 22411908
[x]
Attachment Details

Stored Procedure cursor

Asked by philwill4u in Active Server Pages (ASP), SQL Server 2005

Tags: procedure, stored, asp, cursor

I have an ASP page that reads a database query through a stored procedure to display a list of products with page navigation (max 6 products per page).  Alongside each product I also have a BUY NOW button.  Products are displaying well but whenever I hit the BUY NOW button, it falls over.

I believe the problem lies with the ForwardOnly default cursor, which is great for the sequential display of products.  The BUY NOW function attempts a .MoveFirst() and this is where it is falling over.

Do I need a dynamic cursor in my stored procedure?  If so, how do I do this?  Here's the current call from ASP....

Dim rsFav
Dim rsFav_cmd
Dim rsFav_numRows
Set rsFav_cmd = Server.CreateObject ("ADODB.Command")
rsFav_cmd.ActiveConnection = MM_ConnDBA_STRING
rsFav_cmd.CommandText = "EXECUTE GetSubCatProductList ?"
rsFav_cmd.Prepared = true
rsFav_cmd.Parameters.Append rsFav_cmd.CreateParameter("param1", 200, 1, 255, rsFav__MMColParam) ' adVarChar
Set rsFav = rsFav_cmd.Execute
rsFav_numRows = 6

Any help is much appreciated....Start Free Trial
[+][-]02.25.2007 at 11:07AM PST, ID: 18605773

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Active Server Pages (ASP), SQL Server 2005
Tags: procedure, stored, asp, cursor
Sign Up Now!
Solution Provided By: fritz_the_blank
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32