Click to See Complete Forum and Search --> : Response object error in .asp
baroberts
Aug 20th, 2000, 10:08 AM
In the first section, I see a typo using "ReRedirect".
Also, to reference the field you need to use
rsRedirect("urlfield") instead of "rsRedirect"(the recordset object). The default collection for the recordset is the fields collection but I don't think you can access the field using your syntax. The "Response.Redirect" does not use parenthesis.
bbarnum
Aug 20th, 2000, 06:48 PM
Brad,
I found that typo (oops)and altered the other error and even changed the response redirect line to remove the parenthesis.
36. thise = rsRedirect("urlfield")
37 thise=Cstr(thise)
43. Response.redirect thise
I have some other error now.
ADODB.Field error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/mydsn.com/www/redirect.asp, line 36
which probably means I must've screwed up my connection string, or my parsing code, as a direct isql query gives the right results.
Thanks for your sharp eyes.
baroberts
Aug 25th, 2000, 06:15 AM
In regard to the EOF - BOF error:
This would occur if the SQL query returned an empty recordset. It is ALWAYS prudent to check the status of the recordset object after a query that returns one. You can check rsRedirect.BOF and rsRedirect.EOF. This should be done before any attempt is made to access an expected resultset of a query that returns one. Otherwise you get an error or unexpected result.
Checking the recordset(query) result before using it also lets you identify error conditions. If you are using "On Error Resume Next" you can create your own error handlers that are a lot more intuitive than the ADO/ASP errors. It also makes the code more "user friendly" and will appear more "professionally done". You can never have too much error trapping. Users do not accept fatal errors very well. Your support effort is also dramatically reduced.
OK, I'm off the soap box.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.