Home | Advertising Info16 USERS CURRENTLY ONLINE   
   Site Search Contact Us Sunday, May 29, 2016  

User Management Application with web based screens that allow you to manage users.
Banner Rotation system. Advertisers can monitor online statistical reports via their web browsers.
ASP Photo Gallery
Upload an unlimited amount of albums. Set up categories.Image resizing thumbnail creation.
Classifieds system. Set up categories. Users can register themselves. Supports picture uploads.

Try a free httpZip trial now and compress for less!

We didn't realize
the site was so popular.

Other Stuff

Active Server Pages ASP programs help tutorial tutorials routine routines jobs listserve mailinglist bulletin board bulletin boards programming snippet snippets CJWSoft ASPProtect ASPBanner ASPClassifieds

(Advanced)  (Components)  (Database)  (General)  (Vbscript)


Subject: Re: Error Trapping
From: Harlan
Date: 3/22/1999 2:24:01 PM


sure, here is some code from a dll I'm workin' on that does error trapping. But, I've never tried it in vbscript.

' Name: deleteTest
' Purpose: remove a test from the database
' Takes:
' intTestID; the TestID of the test, from the database
' Returns:
' True; the test was deleted fine
' False; an error occurred, test was not deleted
' errMessage; error message
Public Function deleteTest(intTestID As Integer) As Boolean
On Error GoTo ErrorHandler
'dimension private variables
Dim sqlDeleteTQ As String
Dim sqlDeleteQA As String
Dim sqlDeleteT As String
Dim sqlDeleteC As String
'delete from testquestions
sqlDeleteTQ = "DELETE FROM testquestions WHERE testid=" & intTestID
'delete from question_answer
sqlDeleteQA = "DELETE FROM question_answer WHERE testid=" & intTestID
'delete from class
sqlDeleteC = "DELETE FROM class WHERE testid=" & intTestID
'delete from tests
sqlDeleteT = "DELETE FROM tests WHERE testid=" & intTestID
DBOpen ' open up the database
DB.BeginTrans 'begin our transaction
DB.Execute (sqlDeleteTQ)
DB.Execute (sqlDeleteQA)
DB.Execute (sqlDeleteC)
DB.Execute (sqlDeleteT)
DB.CommitTrans 'commit the transaction
DBClose 'close the database
deleteTest = True

'error handling below
Exit Function
If blnDBOpen Then
End If
deleteTest = False
errMessage = "Error: " & errUnknown & " :dt0909"
End Function

Previous Message


   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright 1998 - 2016 PowerASP.com and Christopher J. Williams
Banner ads ,other site logos, etc are copyright of their respective companies.
STATS Unless otherwise noted - All Rights Reserved.

vbscript active server pages ASP vbscript SQL database informix oracle SQL Server Perl CGI Delphi PHP source code code sample samples program CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspclassifieds.com, www.powerasp.com,www.cjwsoft.com,www.aspphotogallery.com,www.codewanker.com,www.aspprotect.com,www.aspbanner.com