|
-
Mar 17th, 2002, 11:59 AM
#1
Thread Starter
Addicted Member
Recordset Loops
Hi everyone,
Below is a piece of ASP code that I have written, however, whenever I execute it, I get errors saying :
"Object doesn't support this property or method: 'EOF' "
And I can't figure out whats wrong!
Does anyone have any ideas?
Code:
Dim strDivConn, divConnString, divRecordset
Set strDivConn = Server.CreateObject("ADODB.Connection")
divConnString = "DRIVER={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & Session("prjLocation") & "\db\data.mdb" & ";"
strDivConn.Open(divConnString)
divRecordset = strDivConn.Execute ("SELECT * FROM tbl_Divisions;")
do until divRecordSet.EOF
response.write ("<p><input type=radio value='" & divRecordset("divID") & "' name=divID>")
response.write (divRecordset("divName") & vbCrLf)
divRecordset.MoveNext
loop
Adam
P.S. If I remove the DO...LOOP and MoveNext, the code prints the first record fine, it just seems that it cannot run the loop properly!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|