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

All 2 Replies

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

commented: through the internet +0

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.