Home | Advertising Info68 USERS CURRENTLY ONLINE   
   Site Search Contact Us Saturday, September 20, 2014  
 
 


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



DISCUSSION ARCHIVES
 
Try a free httpZip trial now and compress for less!


We didn't realize
the site was so popular.

Other Stuff
 

 
 
PowerASP active server pages asp.net microsoft .net framework sdk learn asp what is asp tutorial learn asp.net CJWSoft ASPProtect ASPBanner ASPClassifieds



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




ASPProtect

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



 

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
ErrorHandler:
If blnDBOpen Then
DB.RollbackTrans
DBClose
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 - 2014 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.

Active Server Pages ASP a directory of ASP tutorials applications scripts components and articles for the novice to professional developer. 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