How would u connect to database using .NET?

Answer Posted / rajeev ranjan lall

SqlConnection conn = new SqlConnection("Data
Source=ServerName;Initial Calalog=DatabaseName;User
ID=username;Password=password")

Is This Answer Correct ?    15 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is disconnected data?

582


How to perform sorting on a table in ADO.NET?

559


Why edit is not possible in repeater?

524


How can we check that some changes have been made to dataset since it was loaded?

518


What is the current version of entity framework?

486






What is connection pooling and what is the maximum pool size in ado.net connection string?

518


Explain the differences between oledb sql server, oledbdotnet provider?

554


What are the several execute methods of ado.net?

504


What is ado.net architecture?

494


Which object needs to be closed?

1749


What is namespace in ado.net?

500


What is data relation?

502


What is the difference between OLEDB Provider and SqlClient?

528


What is the difference between Response.Expires and Reponse.ExpiresAbsolute?

542


What are dcl commands?

508