I am attempting to connect to SQL Azure using the following JDBC connection string:
!|Connect|jdbc:sqlserver://xxx.xxxx.xxxx.net,1433;databaseName=DBName;User=xxx@xxx;Password=xxxx;encrypt=true;LoginTimeout=30|
However each attempt will result in a Null error being returned.
I am able to to connect to the SQL Azure from SSMS.
Has anyone got any ideas?
How are you building your connection string? You can use the ones provided at the Azure Portal, which will look like the following:
static String connectionUrl = "jdbc:sqlserver://{your_server}.database.windows.net:1433;database=test;user={username}@{your_server};password={your_password};encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30";
Did you include the pipes in the string? You can follow this tutorial to ensure you're following the right steps: https://msdn.microsoft.com/en-us/library/azure/gg715284.aspx