How would u connect to database using .NET?

Answer Posted / ramakrishna

sqlconnection cn =new sqlconnection("uid=sa;pwd=sa;data
source=servername;database=databasename");

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is faster ado.net or linq?

517


Explain how to bind the controls(best practice) comboboxes to the data in the dataset?

558


Can we connect two dataadapters to same data source using single connection at same time?

530


What are the different execute methods of Ado.Net?

553


What is ado.net and its architecture?

502






What is the difference between typed and untyped dataset?

510


Some important instruction regarding ADO.NET connection string ?

544


Explain the role of data provider in ado.net? What is the role of data provider in ado.net?

528


What is the use of SqlCommandBuilder?

622


What is the difference between connected and disconnected environment?

493


What is XML serialization

590


What are the Features of a dataset

666


What is shadow copy?

581


What is difference between sqldatareader and sqldataadapter?

490


Which property is used to check whether a DataReader is closed or opened?

570