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

What are the parameters that control most of connection pooling behaviors?

517


What are two types of transaction supported by ado.net?

535


What is meant by ‘transaction’ in a database and what are the ‘properties of transaction’?

535


Which object holds only data and does not interact with data source?

501


What are the different namespaces used in the project to connect the database? What data providers available in .net to connect to database?

779






What is the current version of entity framework?

489


How do you update database through dataset?

544


What is a datareader object?

585


Which object needs to be closed?

1751


Explain what are the steps to connect to a database?

498


What are disadvantages of microsoft-provided data provider classes in ado.net?

508


Explain the namespaces in which .net has the data functionality class.

540


Explain the difference in record set and dataset?

493


how we can fire event in databound coulm in datagfrid withot using button?

578


Describe the command object and its method.

526