JDBC: Simple MSSql connection example not working

后端 未结 8 1522
无人共我
无人共我 2020-12-08 10:29

I am learning Java and need to just run something simple to retrieve some data from MSSQL via JDBC. The example in my book doesn\'t work (but it is several years old) and th

8条回答
  •  醉梦人生
    2020-12-08 11:13

    In my Case : I wasn't adding the port number in the URL string

    String url = "jdbc:sqlserver://ABC\\SQLEXPRESS;databaseName=xyz;portNumber=1433"
    

    it solved my issue

提交回复
热议问题