i want to connect to SSMS database from eclipse but it throws SQLserverException

后端 未结 2 835
一整个雨季
一整个雨季 2021-01-28 18:12

I want to connect to SSMS database from eclipse. when compiler reaches to DriverManager.getConnection(url) line it throws error.I enable TCP/IP also but it giving e

2条回答
  •  死守一世寂寞
    2021-01-28 18:59

    If "MSSQLSERVER" is the name of the database then try

     "jdbc:sqlserver://localhost;databaseName=MSSQLSERVER;user=sa;password=coder182"
    

    if it is the name of the instance try

     "jdbc:sqlserver://localhost;instanceName=MSSQLSERVER;user=sa;password=coder182"
    

    and of course verify that the server is running and using port 1434

提交回复
热议问题