Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BOF returns false and I'm at the beginning ? :'(

Status
Not open for further replies.

N3XuS

Programmer
Mar 1, 2002
339
BE
when I reach the end or beginnning of my record it doesn't return EOF or BOF true. I expect this has something to do with my cursortype as it's the first time I use this one.

Thanks

Code:
Set rsNID = Server.CreateObject("ADODB.Recordset")
rsNID.ActiveConnection = Application("ConnectionString")
rsNID.Source = "select ID from " & selectTable(Request("Genre")) & " WHERE groupID=" & request("groupID") & " ORDER BY ID ASC"
rsNID.CursorType = 1
rsNID.CursorLocation = 2
rsNID.LockType = 1
rsNID.Open()

---- set the recordset to current ID ---

if NOT rsNID.EOF then
	rsNID.moveNext
	volgendeID = rsNID("ID")
end if

if NOT rsNID.BOF then
	rsNID.MovePrevious
	if NOT rsNID.BOF then
	response.write(rsNID.BOF)
		rsNID.MovePrevious
		vorigeID = rsNID("ID")
	end if
end if
 
lol I wonder why it is I always solve my own problems right after I post it here :) I never normally move 1st and then print the value which is why this was giving an error :'(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top