Gec cevap yazdigim icin ozur dilerim. Internet gitti :(
2 tip kod dendim:
1-
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
String connectionUrl = "jdbc:sqlserver://UNIMATRIX001:1433;database=db;user=user;password=veritabani";
Connection connection = DriverManager.getConnection(connectionUrl);
2-
DriverManager.registerDriver(new
com.microsoft.jdbc.sqlserver.SQLServerDriver());
Connection connection = DriverManager.getConnection(
"jdbc:microsoft:sqlserver://localhost:1433","user","veritabani");
Ikisi de
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
bu hatayi veriyor.
SQL server a service pack yuklemedim. MS-SQL 2000 Developer Edition kurdum.
|