::: URGENTE ::: Erro de Conexão SQL Server

1 resposta
R

Olá galera…

Primeiramente gostaria de agradecer pela atenção e aproveitar para tirar a seguinte dúvida. Fiz o código abaixo para conexão com meu BD e está dando o seguinte erro: com.jnetdirect.jsql.v: Failed Logon:com.jnetdirect.sql.v: TCP/IP connection failed to host:java.net.ConnectException: Connection timed out: connect url:jdbc:JSQLConnect://10.25.60.1/databaseName=Rastreamento/user=sim/password=sim

Connection connection = null;

try

{

String driverName = “com.jnetdirect.jsql.JSQLDriver”;

String serverName = “10.25.60.1”;

String banco = “databaseName=Rastreamento”;

String mydatabase = serverName + “/” + banco;

String username = “user=sim”;

String password = “password=sim”;

String url = jdbc:JSQLConnect:// + mydatabase + / + username + / + password;
// Load the JDBC driver

System.out.print(Loading the JDBC driver…”);

Class.forName(driverName);

System.out.println(OK);
// Create a connection to the database

System.out.print(Creating a connection to the database…”);

connection = DriverManager.getConnection(url);

System.out.println(OK);

}

catch (ClassNotFoundException e)

{

// Could not find the database driver

System.out.println("\nErro1: " + e);

}

catch (SQLException e)

{

// Could not connect to the database

System.out.println("\nErro2: " + e);

}

Por favor me ajudem…

No aguardo

1 Resposta

N

esse ip estranho existe? 10.25.60.1

vc consegue acessar esse DB desta mesma máquina por outro programa?

Criado 7 de janeiro de 2004
Ultima resposta 8 de jan. de 2004
Respostas 1
Participantes 2