I want connect microsoft sql server database using servername,username,password,port number and service name to asp.net api 2019.
This code segment I'm using
SqlConnection con = new SqlConnection(@"server=10.d.13.2q0; database=sdssdsd; Integrated Security=False; User ID=lmgdgdfdfddgs; Password=sdsdsdsds");
please help me. what is the correct code

Recommended Answers

The question here is unclear. No mention of what you tried and in what language.

Jump to Post

All 2 Replies

Still no mention of what you tried and what language in use. "Through the Internet" also means the server's admin would reveal the connection details, tell you which port to use, etc.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.