
04/07/2012, 11:55
|
| | Fecha de Ingreso: marzo-2010
Mensajes: 21
Antigüedad: 15 años Puntos: 0 | |
Respuesta: Java y Sybase intenta asi:
static protected Connection getConnection() {
try {
Class drvClass = Class.forName(driver);
DriverManager.registerDriver((Driver) drvClass.newInstance());
DriverManager.setLoginTimeout(900); //15 minute timeout
// Attempt to connect to a driver.
connection = DriverManager.getConnection(url, user, pwd);
} catch (Exception ex) {
ex.getMessage();
}
return connection;
} |