View Single Post
  #6 (permalink)  
Old September 28th, 2004, 01:15 PM
tbaquero tbaquero is offline
Registered User
 
Join Date: Sep 2004
Location: , , Panama.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I solve the problem by ordering the query in the recordset and not in the stored procedure. In the stored procedure i included a static "ORDER BY", but i then declared the recordset like this:
<% sqlstr=exec sp2512 ''
   Set rs1 = Server.CreateObject("ADODB.Recordset")
   rs1.CursorLocation = 3 'client side cursor
   rs1.ActiveConnection = dataConn 'set the connection
   rs1.CursorType = 3
   rs1.source=sqlstr
   if orderby<>"" then
      rs1.sort=orderby
   end if
   rs1.open
' i get orderby value through request.querystring %>

hope this will help anyone else with this same issue.

TANIA P. BAQUERO
Panama Canal Authority
Student
Reply With Quote