What is the jTDS JDBC Connect URL to MS SQL Server 2005 Express

后端 未结 5 1331
慢半拍i
慢半拍i 2020-12-29 10:01

I\'m trying to connect to a MS SQL Server 2005 Express database that is running on the local host from a java program.

I have tried the same connect URL (below) that

5条回答
  •  猫巷女王i
    2020-12-29 10:38

    Are you sure it is the correct instance? SQL Express tends to install as named instance, like "localhost\SQLExpress", instead of a standard instance. So it would be something like:

    jdbc:jtds:sqlserver://127.0.0.1:1433/Finance;instance=
    

    If this doesn't work, try dropping the instance name, and changing the port to the port used by the named instance:

    jdbc:jtds:sqlserver://127.0.0.1:/Finance
    

    Else try to check your connectivity through OSQL.exe tool first. You can also check the jTDS FAQ on this.

提交回复
热议问题