Hi,
i recently created a thread explaining a problem with a connection to a sql database and a port, located here:
2144137
im still trying to resolve that,
this is the code i have:
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String url = "jdbc:sqlserver://localhost:1433;databaseName=Factura";
Connection conn = DriverManager.getConnection(url,"sa","");
but i have a question:
can i connect to the database without specifying the port?
i mean, im also connecting to that database with another programming language, and im not specifying a port in that language and the connection is working correctly.
can you also connect to a database in java without the need of a port?
how can i do that?
thanks..
Edited by: derok on Dec 9, 2010 3:30 PM