How to Trap exception RRS feed

  • Question

  • User-863835478 posted
    I've used data access block for learning and haven't used it extensively in production yet.
    Please advise how to trap exceptions if the data access operation fails because of timeout, dead locks, or connection problems, etc...
    Thanks much.
    Monday, July 25, 2005 9:34 PM

All replies

  • User-1786411686 posted
    you could use Try/Catch block.

        'open the connection
        'execute your query.
    Catch exc As Exception
        'close your connections
    End Try

    Monday, July 25, 2005 10:02 PM