1
0
mirror of https://github.com/Microsoft/sql-server-samples.git synced 2025-12-08 14:58:54 +00:00

Updated connection strings

This commit is contained in:
Meet Bhagdev
2016-07-18 17:09:13 -07:00
parent 74f3838a54
commit 226908823c
11 changed files with 36 additions and 72 deletions

View File

@ -8,13 +8,12 @@ import com.microsoft.sqlserver.jdbc.*;
// Replace server name, username, and password with your credentials
public static void main(String[] args) {
String connectionString =
"jdbc:sqlserver://your_servername.database.windows.net:1433;"
+ "database=AdventureWorks;"
+ "user=your_username@your_servername;"
+ "password=your_password;"
"jdbc:<your_servername>;"
+ "database=<your_databasename>;"
+ "user=<your_username@your_servername>;"
+ "password=<your_password>;"
+ "encrypt=true;"
+ "trustServerCertificate=false;"
+ "hostNameInCertificate=*.database.windows.net;"
+ "loginTimeout=30;";
// Declare the JDBC objects.