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

ASP paging via Stored Proc and ADO

Status
Not open for further replies.

Antzz

Programmer
Jan 17, 2001
298
US
The scenario :
I am retrieving a bunch of records from a SQL Server database via a stored procedure. And I am using ADO in conjunction with ASP to display the records. The problem is I cannot use the paging feature of ADO when I retrieve the records via a stored proc but it works ok if I embed the query inside ASP.

I use the ADO Command object to set the parameters for the stored procedure and use
Set Recordset = Command.Execute
to retrieve the records.

In case of a query embedded in ASP, I use
Recordset.Open QueryStr, Connection, adOpenStatic

Now does anyone out there know whether we can use the paging mechanism that ADO provides with stored procedures? Thanx for all your help in advance
 
Hey,
I saw this before but it is not what I am looking for. I still want to use the ADO paging methods and properties without writing a whole stored procedure for it. I mean the stored procedure just processes and returns whatever records it has to without doing paging which will be left for ASP and ADO to figure out...
Thanx anyways.

I will really appreciate it if anyone has got anymore ideas..
 
Hello,
Check out a technique given in learnasp.com It has a real cool logic for paging without stored procedures.
Thank you...
RR

 
Alright, I guess I was not making myself clear.

What I want to do here is a combination of ASP and stored procedures. I do not want ASP to go on working on complex queries. I want to perform all the heavy duty load through a stored procedure and return a bunch of records. After that, I want to use ADO methods to do the paging.
(or any other technique - I am saying ADO because it already has the paging methods built in; only thing is they do not seem to work with SPs)

Any ideas guys?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top