JDBC connection Url for SQLServer express R2

前端 未结 4 1747
鱼传尺愫
鱼传尺愫 2021-01-03 04:12

I wrote the below line for connection with sql server express r2:

Connection con=DriverManager.getConnection(\"jdbc:sqlserver://localhost/SQLEXPRESS;databaseName=abc

4条回答
  •  萌比男神i
    2021-01-03 04:48

    I also got the same problem in sqlserver2008. To resolve these issu follow the sets as below: Start sqlserver-> from login window select Options button-> Connection Properties-> Connect to Database-> Brows and select database name-> then below in Network protocol select TCP/IP. And do execute your program.

提交回复
热议问题