hi, there ive been having problems in connecting to MS SQL Server through java, could someone help me, as im struggling to do so. thanks in advance.
kind regards
hbutt.
// Load the JDBC driver
Class.forName(driverName);
// Create a connection to the database
connection = DriverManager.getConnection(url, username, password);
} catch (ClassNotFoundException e) {
// Could not find the database driver
} catch (SQLException e) {
// Could not connect to the database
}
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.