How would u connect to database using .NET?

Answer Posted / vivek

using Connection object
SqlConnectin cn=new SqlConnection();
from .net we can connect to any backend with middlleware
and direct connections.
middleware means ODBC,OleDb,ISAM etc.
we can directly connect to Sqlserver and Oracle
we can connect to sql server in 4 ways
1)direct connection
2)ODBC way
3)OleDb way
4)Express way
for oracle we can connect in 3 ways.
1)direct connection
2)ODBC way
3)OleDb way

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you find the count of records in a dataset?

669


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

758


Define atomicity?

785


What is difference between ado.net and asp net?

735


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

738


Which is the feature of ado.net?

728


What are the namespaces used in ADO.Net to connect to a database?

791


What is datatable in ado.net?

703


What does executereader return?

714


How to enable and disable connection pooling?

718


Define data adapter?

689


What are the connected and disconnected modes in ado.net?

687


What is untyped dataset?

779


Define data access layer?

705


What is the full form of ado.net?

742