Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: objRS.MoveFirst Bug


Message #1 by "Olivier Rousseau" <oroussea@h...> on Fri, 11 Oct 2002 20:52:38 +0000
Dim objConn
Dim objRS
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "DSN=CVendu"
objConn.Open
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open "Accessoires", objConn, adOpenStatic, adLockReadOnly, adCmdTable
Set objRS = objConn.Execute("SELECT * From Accessoires WHERE NumCons = '" & 
Session("NumCons") & "' Order By Accessoire") %>

if(not objRS.EOF and not objRS.BOF) then
  Do While Not objRS.EOF
    %><OPTION VALUE="<%=objRS("NumAcc")%>"><%=objRS("Accessoire")%>
    <%objRS.MoveNext
  Loop
  objRS.MoveFirst    --> BUG AT THIS LINE!!!!!!!
end if


i receive the following error message:
ADODB.Recordset (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested 
operation requires a current record.


the thing is that i know that im at EOF! :) that's why i want to go to
my first item.

need help,
thanks
    -Olivier

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


  Return to Index