|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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 |
|
#2
|
||||
|
||||
|
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 |
|
#3
|
||||
|
||||
|
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?
|
|
#4
|
|||
|
|||
|
rs.open sql, conn, 3, 3 always works for me for navigable recordsets.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > ASP/VBScript ADO Recordset Requery |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|