M morpheus21 New Member May 26, 2021 #1 Hello, i would love to do some future projects using B4J. For this i need to connect to a 2012 Microsoft SQL-Server. Unfornutaley i cant get it working. Im trying to connect using mssql-jdbc-8.4.1.jre11. Trying and reading posts since days. Does anyone have a working example for me ? Library JdbcSQL 1.50 is enabled. B4X: Copy SQL.Initialize2("com.microsoft.sqlserver.jdbc.SQLServerDriver", "jdbc:sqlserver://192.168.2.65/eazybusiness;Port=1433;databaseName=JTLWAWI", "xxxxxxx", "xxxxxx") This is my try to connect. Getting "Error connecting to server". I tried jtds-1.3.1 before, and was able to connect. But it did not work as a standalone (Charset problems). So serverside should be fine ? Thanks in advance !
Hello, i would love to do some future projects using B4J. For this i need to connect to a 2012 Microsoft SQL-Server. Unfornutaley i cant get it working. Im trying to connect using mssql-jdbc-8.4.1.jre11. Trying and reading posts since days. Does anyone have a working example for me ? Library JdbcSQL 1.50 is enabled. B4X: Copy SQL.Initialize2("com.microsoft.sqlserver.jdbc.SQLServerDriver", "jdbc:sqlserver://192.168.2.65/eazybusiness;Port=1433;databaseName=JTLWAWI", "xxxxxxx", "xxxxxx") This is my try to connect. Getting "Error connecting to server". I tried jtds-1.3.1 before, and was able to connect. But it did not work as a standalone (Charset problems). So serverside should be fine ? Thanks in advance !
Philip Chatzigeorgiadis Active Member Licensed User Longtime User May 26, 2021 #2 Try conforming your connection string to this: Building the connection URL with the Microsoft JDBC Driver for SQL Server - JDBC Driver for SQL Server Learn about formatting the connection string used by the Microsoft JDBC Driver for SQL Server. Samples of connection strings are included in the examples section. docs.microsoft.com Notice that the instanceName is preceded by backslash and that the port is entered with ":" immediately after the instanceName. Upvote 0
Try conforming your connection string to this: Building the connection URL with the Microsoft JDBC Driver for SQL Server - JDBC Driver for SQL Server Learn about formatting the connection string used by the Microsoft JDBC Driver for SQL Server. Samples of connection strings are included in the examples section. docs.microsoft.com Notice that the instanceName is preceded by backslash and that the port is entered with ":" immediately after the instanceName.
M morpheus21 New Member May 27, 2021 #3 B4X: Copy SQL.Initialize("com.microsoft.sqlserver.jdbc.SQLServerDriver","jdbc:sqlserver://192.168.2.65\JTLWAWI;databaseName=eazybusiness;user=xxxxx;password=xxxxx;") This string did it. Getting a warning because TLS1.1, but works. Many thanks ! Upvote 0
B4X: Copy SQL.Initialize("com.microsoft.sqlserver.jdbc.SQLServerDriver","jdbc:sqlserver://192.168.2.65\JTLWAWI;databaseName=eazybusiness;user=xxxxx;password=xxxxx;") This string did it. Getting a warning because TLS1.1, but works. Many thanks !
Peter Simpson Expert Licensed User Longtime User May 28, 2021 #4 morpheus21 said: This string did it. Getting a warning because TLS1.1 Click to expand... I rarely use MSSQL, but have you tried adding the following line to your connection string. ';sslProtocol=TLSv1.1' Upvote 0
morpheus21 said: This string did it. Getting a warning because TLS1.1 Click to expand... I rarely use MSSQL, but have you tried adding the following line to your connection string. ';sslProtocol=TLSv1.1'