sql - BOF - EOF error -



sql - BOF - EOF error -

i'm getting error asp page when seek run sql query:

adodb.recordset error '800a0bcd'

either bof or eof true, or current record has been deleted. requested operation requires current record.

the code is:

' -- connect database1.accdb database -- set conn1 = server.createobject("adodb.connection") conn1.open "provider = microsoft.ace.oledb.12.0;data source = c:\users\nam2611\documents\my web sites\website1\database3.accdb" ' -- product recordset -- set rs1 = server.createobject("adodb.recordset") rs1.open "select * product p_code 'ap'", conn1 x = "<table border = 1 width= 1000><tr><th>code<th>product name<th>type<th>price</tr>" response.write x ' -- create table entries each pupil -- rs1.movefirst while not rs1.eof x = "<tr><td>" & rs1("p_code") & "<td>" & rs1("p_name") & "<td>" & rs1("p_description") & "<td>" & rs1("p_price") & "</tr>" response.write x rs1.movenext wend response.write "</table>" ' -- close datbase -- rs1.close conn1.close set rs1 = nil

if phone call movefirst() , recordset empty, throws error. should check eof:

if not rs1.eof rs1.movefirst ' loop ' ... end if

sql asp.net vbscript asp-classic adodb

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -