|
-
Dec 29th, 1999, 02:18 PM
#1
Thread Starter
Junior Member
I'm using ADO in ASP page. I want to trap the error that would occur when my query to the database fails. Though I check the Errors collection soon after the Execute method of the Connection object, but the ASP page displays the error message immediately after the Execute method. In my case, the query is failing, due to primary key constraint.
-
Dec 29th, 1999, 08:36 PM
#2
New Member
I didn't understand...did you use something like:
On error goto errorlabel
<your code>
exit sub (or function)
errorlabel:
msgbox <your message>
?
Didn't it work?
Bye, Francis
-
Dec 29th, 1999, 10:14 PM
#3
Guru
I don't believe you can use Goto statements in VBScript. If you want a generic message "there was an error" instead of the details, go into the IIS --> Properties of web application --> configuration --> click on the APP DEbugging tab, then click 'SEND TEXT ERROR MESSAGE TO CLIENT'. that will do what it says instead of giving you a detailed message.
HTH
Tom
-
Dec 30th, 1999, 12:33 PM
#4
Tom is right, in VBScript you can only resume next:
On Error Resume Next
------------------
Serge
Software Developer
[email protected]
ICQ#: 51055819
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|