English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2006-07-02 23:43:53 · 3 answers · asked by akhil 1 in Computers & Internet Programming & Design

3 answers

I assume you mean asp.net and not classic.
Basically
use try catch

try
{
your db code
}
catch (Exception e) // note I don't know which type of connection you are using since you know this you can use sqlException, OracleException, OleDB etc etc....
{
// deal with exception
}
finally
{
// do all cleanup probably want to close the connection object you opened
}

2006-07-03 02:52:46 · answer #1 · answered by ralphd42 2 · 0 0

Try
'Your codes here
Catch ex as Exception
Response.Write(ex.message)
End Try

2006-07-02 23:52:03 · answer #2 · answered by Anonymous · 0 0

put your code to do whatever you want in a TRY CATCH block and catch sql exceptions .....

TRY
your code
CATCH SQLEXCEPTION s AS
code for handling exception
END TRY

2006-07-02 23:49:20 · answer #3 · answered by Ivanhoe Fats 6 · 0 0

fedest.com, questions and answers