Skip to content

Commit

Permalink
Extracting version from database V16
Browse files Browse the repository at this point in the history
  • Loading branch information
SiddharthBITS committed Jan 22, 2025
1 parent bfe47bf commit 6330b25
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions test/JDBC/src/test/java/com/sqlsamples/TestQueryFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,9 @@ public static void setup() throws IOException {
// Query against database to find test version
try
{
connectionString = createSQLServerConnectionString(URL, tsql_port, databaseName, user, password);
connection_bbl = DriverManager.getConnection(connectionString);
// connectionString = createSQLServerConnectionString(URL, tsql_port, databaseName, user, password);
// connection_bbl = DriverManager.getConnection(connectionString);

Statement stmt = connection_bbl.createStatement();
ResultSet rs = stmt.executeQuery("SELECT @@VERSION;");

Expand Down Expand Up @@ -306,11 +307,12 @@ public static void setup() throws IOException {
}

System.out.println("VersionCheck : Version : " + majorVersion + "_" + minorVersion);
if (connection_bbl != null)
{
connection_bbl.close();
}
connection_bbl = null;

// if(connection_bbl != null)
// {
// connection_bbl.close();
// }
// connection_bbl = null;
}
catch (SQLException e)
{
Expand Down

0 comments on commit 6330b25

Please sign in to comment.