Home | Advertising Info239 USERS CURRENTLY ONLINE   
   Site Search Contact Us Tuesday, November 20, 2018  

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.


We didn't realize
the site was so popular.

Other Stuff

Active Server Pages what is asp programming how to sample asp example code scripts software asp forum mail sessions applications global.asa 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 - 2018 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.

PowerASP active server pages asp.net microsoft .net framework sdk learn asp what is asp tutorial learn asp.net 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