Ways to create connection in ADO.NET

What are the ways to create connection in ADO.NET?

There are two ways to create connection supported by ADO.NET.

- Steps to create connection in code
- Create instance of connection object.
- Set the ConnectionString property.

Steps to create connection using designer
Drag connection object from the Data tab of the toolbox.
Set the ConnectionString property using properties window.
Access database at runtime using ADO.NET
Access database at runtime using ADO.NET - Steps to connect to database - Declare and initialize database connection object with appropriate connection string...
ADO.NET Code showing Dataset storing multiple tables
ADO.NET Code showing Dataset storing multiple tables - Declare and initialize database connection object with appropriate connection string.....
ADO.NET Code executing stored procedure
ADO.NET Code executing stored procedure - Code showing how to fetch data using Stored Procedure...
Post your comment