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 is sqldatareader?
What are the major difference between classic ADO and ADO.NET?
What is ado net stands for?
What is partial class?
Define atomicity?
What is Serialization in .NET? what are the types of Serialization?
What is the difference between Data adaptor and Data set?
What is ole in excel?
What are the connected and disconnected modes in ado.net?
What is sql command in ado net?
What are the namespaces used in ADO.Net to connect to a database?
What is the difference between a datareader and a dataset?
Which name space is used to get assembly details?
Explain the basic use of "dataview" and explain its methods.
What is namespace in ado.net?