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
What are ado.net objects?
Explain the various objects in dataset.
Explain the difference between data reader and data adapter?
What is acid in ado.net?
Why is stored procedure used in ado.net?
What are good ado.net object to replace to ado recordset object.
What is the meaning of executenonquery?
What are the advantages and drawbacks of using ado.net?
If a table contains 20000 records . In a page at each time 100 records to be displayed what are the steps you will take to improve performance? Will you use dataset or datareader?
What is the maximum pool size in ado.net connection string?
What is XML serialization
Explain the differences between oledb sql server, oledbdotnet provider?
What are the essential features of ado.net?
What is a non query?
What is difference between connected and disconnected architecture in ado.net?