Stata community: I am attempting to connect to a db using jdbc using the following:
local jar "mssql-jdbc-12.4.2.jre11.jar"
local driverc "com.microsoft.sqlserver.jdbc.SQLServerDriver"
local url "jdbc:sqlserver://{HOST}:1433/{DB}"
local user "{USER}"
local pass "{PW}"
jdbc add MyDB, jar("`jar'") driverclass("`driverc'") url("`url'") user("`user'") password("`pass'")
jdbc connect MyDB
jdbc showtables
connection failed
The port number 1433/{DB} is not valid.
r(681);
I've obscured the actual HOST, USER, PW, and DB in the above. As you can see I get the error that the port number 1433/DSN is not valid. I've been through the documentation, read through the threads, and done my own research, but I don't know why this fails to execute. If you've connected using the MS jdbc driver 12.4.2 I'd appreciate any guidance here. Thanks in advance.
Running Stata 18 on Macbook Pro M1 Max Sonoma 14.3
local jar "mssql-jdbc-12.4.2.jre11.jar"
local driverc "com.microsoft.sqlserver.jdbc.SQLServerDriver"
local url "jdbc:sqlserver://{HOST}:1433/{DB}"
local user "{USER}"
local pass "{PW}"
jdbc add MyDB, jar("`jar'") driverclass("`driverc'") url("`url'") user("`user'") password("`pass'")
jdbc connect MyDB
jdbc showtables
connection failed
The port number 1433/{DB} is not valid.
r(681);
I've obscured the actual HOST, USER, PW, and DB in the above. As you can see I get the error that the port number 1433/DSN is not valid. I've been through the documentation, read through the threads, and done my own research, but I don't know why this fails to execute. If you've connected using the MS jdbc driver 12.4.2 I'd appreciate any guidance here. Thanks in advance.
Running Stata 18 on Macbook Pro M1 Max Sonoma 14.3
Comment