JDBC: Simple MSSql connection example not working

后端 未结 8 1524
无人共我
无人共我 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:12

    Causes :

    1. protocol (TCP/IP) is not enabled
    2. Port is incorrect
    3. missing of sqljdbc_auth.dll
    0 讨论(0)
  • 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

    0 讨论(0)
提交回复
热议问题