> Hello, I have an edit form where the name is already populated. When
> the user submits this form, it posts to a process email page which
[quoted text clipped - 20 lines]
> Thanks in advance,
> Bruce
If I do what yo suggest, and don't put any response between the
If...End If, I still get this error:
Either BOF or EOF is True, or the current record has been deleted.
Requested operation requires a current record.
I need to just suppress the error or handle it so it falls through and
continues processing.
Ray Costanzo [MVP] - 25 Oct 2005 18:39 GMT
No, you don't need to supress the error. You need to not cause errors.
If not yourRS.EOF then
your code that uses yourRS here. NOT outside of this if/then block!
End If
Ray at work
> If I do what yo suggest, and don't put any response between the
> If...End If, I still get this error:
[quoted text clipped - 3 lines]
> I need to just suppress the error or handle it so it falls through and
> continues processing.
Mark Schupp - 25 Oct 2005 18:39 GMT
Are you trying to fill in data in the form from the database? You can only
use the recordset if a row is found.
If Not rs.EOF Then
'get data from recordset
End If
rs.Close
'now fill in the form fields

Signature
--Mark Schupp
> If I do what yo suggest, and don't put any response between the
> If...End If, I still get this error:
[quoted text clipped - 3 lines]
> I need to just suppress the error or handle it so it falls through and
> continues processing.
Roland Hall - 26 Oct 2005 08:42 GMT
: If I do what yo suggest, and don't put any response between the
: If...End If, I still get this error:
[quoted text clipped - 3 lines]
: I need to just suppress the error or handle it so it falls through and
: continues processing.
if not (rs.BOF or rs.EOF) then
' records returned
else
' no records returned
end if

Signature
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Kermit Piper - 27 Oct 2005 19:37 GMT
What I didn't explain earlier, is that below this code I have a CDONTS
process which is dependent upon the recordset not failing:
<%
objRS.MoveFirst
Do While Not objRS.EOF
For i = 0 to objRS.Fields.Count - 1
'Response.Write "ID " & objRS.Fields(i).Value
%>
<%
objCDO.Subject = "IT Help Desk #" & objRS.Fields(i).Value & ", " &
x_Recommendation_Type & ", " & x_System_Type strBody = strBody &
"Request ID: " & objRS.Fields(i).Value
%>
<%
Next
objRS.MoveNext
Loop
objRS.Close
set objRS = Nothing
objConn.Close
set objConn = Nothing
%>
Bob Barrows [MVP] - 27 Oct 2005 19:48 GMT
> What I didn't explain earlier, is that below this code I have a CDONTS
> process which is dependent upon the recordset not failing:
Then either:
A) Put that process inside the if statement
B) Set a flag variable in your rs check:
dim bRsOK
bRsOK=false
if not objRS.EOF then
bRsOK = true
'do the other stuff with the recordset
end if
'later
if bRsOK then
'do your CDONTS stuff
end if
Bob Barrows

Signature
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.