i'm can't see what programming category you've posted this in .. but in vb
private sub mysubname()
on error goto err_mysubname
' my sql server connection stuff
exit sub
err_mysubname
msgbox "An error occured connecting to SQL Server"
exit sub
end sub
in java
try{
// your SQL Server connection stuff.
}catch(SQLException SQLE){
System.out.println("An error occured connecting to SQL Server");
throw new Exception("SQL Server connection error");
}catch(Exception e){
System.out.println("Error : " + e.toString());
throw new Exception("Error : " + e.toString());
}
Main Topics
Browse All Topics





by: emoreauPosted on 2003-09-06 at 11:55:31ID: 9302217
if you are using ADO, set the ConnectionTimeOut property of the Connection object to a short period (default is 30 seconds).