Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
Hello everyone,
Have any of you tried the access a MS SQL database from Jlink?
I have be trying but having troubles to connect.
If you have any experience please let me know.
Allan
Some old discussion - "JLink": https://community.ptc.com/t5/Customization/JLink/td-p/199246
I have problems with finding a suitable driver, but i compiles well.
I trying with the Microsoft driver.
It seems to, I can't get the Microsoft driver to load.
I use this code:Connection connection = null;
String url = "jdbc:sqlserver://xxxxxx\\DTW:63825;databaseName=DataWarehouse;encrypt=false;trustServerCertificate=false;loginTimeout=30;";
Statement stmt = null;
ResultSet result = null;
String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
String databaseUserName = "xx";
String databasePassword = "xx";
try {
// Class.forName(driver);
connection = DriverManager.getConnection(url, databaseUserName, databasePassword);
} catch (SQLException ex) {
} finally {
try {
if (connection != null && !connection.isClosed()) {
connection.close();
}
} catch (SQLException ex) {
}
}
Here I got no suitable driver found.
If I also have Class.forName(driver); added I got no class found.
I have the sqldriver in my classpath.
Any ideas?