Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > recordsets and error handling

Reply
Thread Tools

recordsets and error handling

 
 
JT
Guest
Posts: n/a
 
      09-15-2003
any suggestions on the correct way to do this?

if my procedure fails to run, then my .dll sets errorFlag = 1, but the
problem is i also need to check for errors coming back from the db upon
succesful completion of my procedure.

however, if my procedure fails to run, then i obviously do not have a
recordset - in this case i keep getting this strange error that is occurring
becasue i'm referencing a recordset that is not there. is there a way to
check for the existence of a recordset before referring to it?

here is my sample code:

'if error flag from objDBInterface = 1, then we know the procedure did not
run -
'probably procedure was not found or parameters were incorrect

If objDBInterface.ErrorFlag = 1 Then

set objDBInterface = nothing
session("err_flag") = 100


'or elseif field 'err_for_asp' returned -1 then the procedure ran but came
back with an error
'check tErrors for more details

Else if rs.Fields("err_for_asp") = "-1" Then
rs.Close
set objDBInterface = nothing
session("err_flag") = 101
End If


tia
jt


 
Reply With Quote
 
 
 
 
Ken Schaefer
Guest
Posts: n/a
 
      09-16-2003
Check if the object is Nothing

?

Cheers
Ken

"JT" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
: any suggestions on the correct way to do this?
:
: if my procedure fails to run, then my .dll sets errorFlag = 1, but the
: problem is i also need to check for errors coming back from the db upon
: succesful completion of my procedure.
:
: however, if my procedure fails to run, then i obviously do not have a
: recordset - in this case i keep getting this strange error that is
occurring
: becasue i'm referencing a recordset that is not there. is there a way to
: check for the existence of a recordset before referring to it?


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SqlDataSource and multiple recordsets =?Utf-8?B?TWFkaXNvbg==?= ASP .Net 5 07-24-2007 04:34 PM
Q: About how/where to store RecordSets in UserControls? Sky ASP .Net 2 03-04-2004 10:13 AM
how to mix 2 recordsets into one result table? AFN ASP .Net 5 02-11-2004 11:38 PM
arrays and recordsets Stuart Javascript 4 01-25-2004 05:55 PM
Classes and recordsets Boardrider ASP General 1 11-03-2003 06:08 PM



Advertisments