I want to try to make the connection sql server 2008 r2 with java using the netbeans IDE. I have downloaded the latest version of jdbc drive (Microsoft SQL Server JDBC Driver 3.0).
I have written the code as below
but I got the following error, the error message like below
com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'user'.
private final String userName = "user";
private final String password = "password";
Check these details and pass valid username and password in connection string..
Joined: Oct 31, 2011
thanks for the help,
my username and password are already correct, because i use windows username and password account
My server name is "myinstance", in propersties and security I am using "sql server and windows authentication mode".
but there is still a problem, what should i do now..?