2

I was working on a java application and tried passing the db string just as we passed to connect to localhost sql db.But failed. Is there any other possible way?

public String db_URL = "jdbc:sqlserver://neutroserver.database.windows.net:1433;database=NeutroDB;user=lakshangunarathna@neutroserver;password={your_password_here};encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30;";
public String db_Username = "root";
public String db_Password = "";
1
  • 1
    "It failed" isn't an error description or error message. You pass connection strings the same way you pass any connection string. Did you get an actual error? Where is the code you used? What you typed here isn't code, it's just a couple of variables. The connection string doesn't contain any authentication information either. Where and how do you pass the username and password? Commented Apr 25, 2017 at 10:11

1 Answer 1

1

see https://learn.microsoft.com/en-us/azure/sql-database/sql-database-connect-query-java this topic should address your questions - if not - please give more details

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.