0

I have a problem connecting my SQL server database to Netbeans. The error I get is "Cannot establish a connection to jdbc:sqlserver://localhost;databaseName=Registration using com.microsoft.sqlserver.jdbc.SQLServerDriver (Login failed for user ''. ClientConnectionId:3ca0fbd4-70fa-4780-95fe-52b759f6a37f)"

What I did:

  1. Opened Sql Server and Created a database and used Windows Authentication since Im doing all this on my personal device.

  2. I downloaded the jdbc zip folder and unzipped it to access the mssql-jdbc-9.2.1.jre8.jar file.

  3. I opened Netbeans and went to my project. I then added the mssql-jdbc-9.2.1.jre8.jar file under my libraries.

  4. I then went to "Services", right-clicked on Database and created a new connection. I created a new driver and added the mssql-jdbc-9.2.1.jre8.jar file to it.

  5. I filled in all the necessary details but I still get an error when testing the connection.

Please note: I enabled my TCP/IP beforehand. I also ensured that my software is updated. I also tried adding "integratedSecurity=true;" and "integratedsecurity=false" but the results are still the same. I also tried removing the port number and using "localhost" as my Host. I have added pictures to show the steps I went through.

The file I used:
The file I used

SQL Server login:
SQL Server login

The error I get after everything:
The error I get after everything

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Kay
  • 46
  • 6

0 Answers0