First you need to download the appropriate drivers then there are several ways to connect: ex: Connection connection = DriverManager.getConnection( "jdbc:sqlserver://YourServerName:1433;databaseName=YourDatabaseName;integratedSecurity=true"; ); there might be some problems regarding the open ports or others better to google for them
By using Google
If you ask this question or something like that in stackoverflow, you will get a lot of down votes.
Обсуждают сегодня