What are the steps in connecting to database?
Answer Posted / chaitanya.k
1. U need to declare name space according to which database
u need to connect.
2. U can declare connection string in two ways.
1. U can declare in web.config in appsettings.
2. U can delare directly in code behind or in inline code
These can delared by using connection string.
3. Then u can do the operations by open the connection.
4. After complete all ur transcations u need to close the
database.
| Is This Answer Correct ? | 10 Yes | 3 No |
Post New Answer View All Answers
Define connection string?
What are typed and untyped dataset?
What is the difference between Datareader and Dataset?
What are the disadvantages of using datalist?
Which is faster datareader or dataadapter?
Describe briefly an ADO.NET Dataset ?
How would you connect to a database by using .NET?
What are dataproviders?
What is shadow copy?
What is connection in ado.net?
Is it possible to edit data in Repeater control?
What are the advantages and disadvantages of using datalist?
What are the advantages of using datalist?
Can we load multiple tables in a dataset?
Define Execute Reader?