ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 28th, 2003, 07:59 PM
aaron.martone's Avatar
aaron.martone aaron.martone is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Central Florida
Posts: 76 aaron.martone User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via ICQ to aaron.martone
Exclamation ASP/VBScript ADO Recordset Requery

I am using DWMX on IIS 5.1 (WinXP Pro) with ASP/VBScript on an Access 2000 Database.

I'm not much on ADO yet so I let DWMX write my Database Recordsets. I noticed one of the lines of code as:

objRecordset.CursorType = 0

Later in my code, I cycle through this recordset to it's end. And then later on in the code some more I need to REcycle through it again, but I get an EOF/BOF error.

I tried:

objRecordset.MoveFirst

and

objRecordset.Requery

but am still gettin same errors.

I think I heard that CursorType 0 is forward only. So I change it to 1, 2 and 3 and still have problems. Can someone shed light on what I need to do in order to re-go through my recordset?
__________________
aaron martone
professional web developer

Reply With Quote
  #2  
Old October 29th, 2003, 09:01 AM
don_sparko's Avatar
don_sparko don_sparko is offline
Digitally Challenged
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 280 don_sparko User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 54 m 14 sec
Reputation Power: 6
what i would suggest is writing a function that you pass a record set into, and then write another function that does your other output. you can pass the same recordset to each and it will treat each like its own recordset. here is an example:
say you have a recordset RStest.
Code:
<%function display1(passedrecordset)
while not passedrecordset.eof
response.write passedrecordset(0)
passedrecordset.movenext
wend
end function%>

and then your next function would look very similar
Code:
<%function display2(gothroughagain)
while not gothroughagain.eof
response.write gothroughagain(0)
gothroughtagain.movenext
wend%>

if you pass the recordset without doing anything to it in the first place you should be able to use each function as many times as you want.
__________________
My brain cells are like a storm trooper's armor: useless

Reply With Quote
  #3  
Old October 30th, 2003, 12:47 AM
aaron.martone's Avatar
aaron.martone aaron.martone is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Central Florida
Posts: 76 aaron.martone User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via ICQ to aaron.martone
I tried that out and am gettin the same error. Just to let you know though, I DO mess with the recordset after it is made first (have to output some data) But then I need to re-reference all the records in the set, so I tried MoveFirsts and Requerys and a plethora of CursorType combos, but all getting the same error. Is there a way of invoking a more advanced error output for ISS 5.1 so I can read further into the error than the non-friendly ASP error message?

Reply With Quote
  #4  
Old October 30th, 2003, 11:19 AM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,957 Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 15 h 35 m 19 sec
Reputation Power: 802
rs.open sql, conn, 3, 3 always works for me for navigable recordsets.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > ASP/VBScript ADO Recordset Requery


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT