andrew4582

VB attempt at Try Catch Finally

Dec 17th, 2011
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ASP 0.25 KB | None | 0 0
  1. Dim conn
  2. on error goto catch
  3.     'Do work here
  4.     set conn = new DbConnection()
  5.    
  6.     goto finally
  7. catch:
  8.     MsgBox(Error)
  9.    
  10.     goto finally
  11. finally:
  12.     if(conn not is nothing) then
  13.         conn.Close()
  14.         set conn  = nothing
  15.     end if
Advertisement
Add Comment
Please, Sign In to add comment