This is the error msg
**************
ADODB.Field error '80020009'
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/members/logon/main.asp, line 0
***************
This is my code
**************
<%
sqlrs2="SELECT * FROM customers WHERE (ID ="&Session("UID").Item("ID") &") ORDER BY AutoNumber desc"
Dim pPath2
vPath2 = "../../fpdb/tree_service_entry.mdb"
pPath2 = Server.MapPath( vPath2 )
DIM objConn2
Set objConn2 = Server.CreateObject("ADODB.Connection")
objConn2.ConnectionString= "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & pPath2 & ";" & "JET OLEDB
atabase Password=house2456"
objConn2.Open
DIM objRS2
Set objRS2 = Server.CreateObject("ADODB.Recordset")
objRS2.Open sqlrs2, objConn2
%>
<%
If objRS2.eof or objRS2.bof then
Response.write("No Data")
Else
End If
%>
<%=objRS2("AutoNumber")%>
<%
objRS2.Close
Set objRS2 = Nothing
%>
<%
objConn2.Close
Set objConn2 = Nothing
%>
****************
Seems that my IF objRS2.eof or objRS2.bof then statements are wrong. Whit it set up like this the error Text (No Data) will write to the page above the Database error msg. I know that I am just typing something wrong.
In my results I do not want it to loop, I just want one record (the largest autonumber)
Any assisance is greatly appreciated
Thanks