1-) Java - MSSQL BAĞLANMA CONNECT ETME
public Connection GetConnection() {
String connec = "jdbc:sqlserver://localhost:1433;databaseName=oylesine;user=sa;password=123";
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
try {
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
con = (Connection) DriverManager.getConnection(connec);
} catch (ClassNotFoundException | SQLException e) {
JOptionPane.showMessageDialog(null, e.toString(), "student DataBase", JOptionPane.INFORMATION_MESSAGE);
}
return con;