I want to make a access to my sql database than is placed in ASUS\MSSQLSERVER1
and database names "Test" with access to user teste with password teste
in java code I coded this:
@Test
public void TesteTemp() throws SQLException, InstantiationException, IllegalAccessException, ClassNotFoundException
{
Class.forName("net.sourceforge.jtds.jdbc.Driver").newInstance();
String connString = "jdbc:jtds:sqlserver://ASUS/Test;instance=MSSQLSERVER1;user=teste;password=teste;";
Connection conn = null;
try{
conn = DriverManager.getConnection(connString);
}catch(SQLException ex){
ex.printStackTrace();
}
conn.close();
}
And I receive this error:
Server ASUS has no instance named MSSQLSERVER1.
It makes sense?
I have the MSSQLSERVER1 service running.