jTDS Connect URL

Gary picture Gary · Mar 6, 2012 · Viewed 7k times · Source

I am using jTDS to connect SQL Server 2005 Express. My connect url is jdbc:jtds:sqlserver://127.0.0.1:1433/dbstore;user=myusername,password=mypassword

It's not connecting with a "SQL server refusing connection" problem.

Is there something wrong with my code.

Answer

sikander picture sikander · Mar 6, 2012

Your connection string is incorrect. The user and password parameters should be separated with a ";" instead of ","

jdbc:jtds:sqlserver://127.0.0.1:1433/dbstore;user=myusername;password=mypassword

Also, there are numerous other questions about jTDS connection strings such as:

Help me create a jTDS connection string

Please search before creating a new question.