Been working on this for several days. Trying to connect to a Sql Server database that I can connect to with VB.NET with no problem. The database is on same machine as B4J. I either get an error after a short time or the Sql. Initialize2 never returns to Ready.
Server is local (192.168.0.233), instance is SSE2017, database is m4storeDSS or StockrightMMS (both Sql Server dbs), usuall use Integrated Security but providing User/Password doesn't help (see 4th example).
Some example connect strings used. These do not return from sql_connectio.Initialize2.
"jdbc:sqlserver://192.168.0.233\SSE2017;database=StockRightMMS;Integrated Security=SSPI;"
"jdbc:sqlserver://localhost\SSE2017;database=M4storeDSS;Integrated Security=SSPI;"
"jdbc:sqlserver://192.168.0.233\SSE2017;database=M4storeDSS;user=SOSuser1;password=SOSpwd;"
I comment and uncomment lines to try different jdbcUrl:
Server is local (192.168.0.233), instance is SSE2017, database is m4storeDSS or StockrightMMS (both Sql Server dbs), usuall use Integrated Security but providing User/Password doesn't help (see 4th example).
Some example connect strings used. These do not return from sql_connectio.Initialize2.
"jdbc:sqlserver://192.168.0.233\SSE2017;database=StockRightMMS;Integrated Security=SSPI;"
"jdbc:sqlserver://localhost\SSE2017;database=M4storeDSS;Integrated Security=SSPI;"
"jdbc:sqlserver://192.168.0.233\SSE2017;database=M4storeDSS;user=SOSuser1;password=SOSpwd;"
I comment and uncomment lines to try different jdbcUrl:
JDBC code fragments:
'Private jdbcUrl As String = "jdbc:sqlserver://localhost\SSE2017;database=M4storeDSS;user=SOSuser;password=SOSpwd;"
'Private jdbcUrl As String = "jdbc:sqlserver://localhost\SSE2017;database=M4storeDSS;Integrated Security=SSPI;"
'Private jdbcUrl As String = "jdbc:sqlserver://192.168.0.233\SSE2017;database=StockRightMMS;Integrated Security=SSPI;"
'Private jdbcUrl As String = "jdbc:sqlserver://192.168.0.233\SSE2017;database=StockRightMMS;"
'Private jdbcUrl As String = "jdbc:sqlserver://localhost;DatabaseName=M4storeDSS;instance=SSE2017;user=SOSuser1;password=SOSpwd;"
Private jdbcUrl As String = "jdbc:sqlserver://192.168.0.233\SSE2017;database=M4storeDSS;user=SOSuser1;password=SOSpwd;"
End Sub
Sub connectToDB
'jdbc_connection.InitializeAsync("sql_connection", driver, jdbcUrl, "ISS", "what")
sql_connection.InitializeAsync("sql_connection", driver, jdbcUrl, "ISS", "what")
Wait For sql_connection_Ready (Success As Boolean)
If Success = False Then
Dim exEx As String = LastException.message
Log("Ready Exception: " & exEx)
Else
Log("Ready Success")
End If