2

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.

lrl
  • 263
  • 4
  • 18
Gary
  • 410
  • 1
  • 6
  • 8

1 Answers1

5

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.

Community
  • 1
  • 1
sikander
  • 2,286
  • 16
  • 23