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:
@ -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.
|
||||
|
||||
Reference in New Issue
Block a user