Technical blog

July 21, 2008

Connecting to MsSql through JDBC

Filed under: java — Tags: — paawak @ 11:39

I was not able to connect to MsSql using JDBC. I was using the host with the port no. like:

jdbc:jtds:sqlserver//localhost:3683/TestDB

I would always get “Connection refused” exception.

Then I chucked out the port no. from the host name, and it works fine now.

jdbc:jtds:sqlserver://localhost/TestDB

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress