VB6:
VB Code:
Dim objConn As Connection On Error Goto ErrHandler: 'code Exit Sub ErrHandler: If Not (objConn Is Nothing) Then objConn.Close Set objConn = Nothing End If Err.Raise Err.Number, Err.Source, Err.Description
VB.NET
How do I do this?VB Code:
Dim Conn As SQLConnection Try 'code Catch Ex As Exception If Not (Conn Is Nothing) Then Conn.Close Conn = Nothing End If 'Want to raise exception to UI here End Try
Woka




Reply With Quote