cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Getting data from MSSQL to Jlink

akok
12-Amethyst

Getting data from MSSQL to Jlink

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

 

 

3 REPLIES 3
VladimirN
24-Ruby II
(To:akok)

akok
12-Amethyst
(To:VladimirN)

I have problems with finding a suitable driver, but i compiles well.

I trying with the Microsoft driver.

akok
12-Amethyst
(To:akok)

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?

 

 

Announcements


Top Tags