ado.net

ADO.NET Projects

ADO.NET Project 1

ADO.NET Examples

Examples



Totel:37 Click: 1 2 3 4 5 6 7 8
ADO.net Interview Questions And Answers

Page 1

ADO.NET is data access layer

We create a connection for database after that we queried the information from database.

Data Provider is a set of components including:
1.The Connection object (SqlConnection, OleDbConnection, OdbcConnection, OracleConnection)
2.The Command object (SqlCommand, OleDbCommand, OdbcCommand, OracleCommand)
3.The DataReader object (SqlDataReader, OleDbDataReader, OdbcDataReader, OracleDataReader)
4.The DataAdapter object (SqlDataAdapter, OleDbDataAdapter, OdbcDataAdapter, OracleDataAdapter).
DataSet object represents a disconnected cache of data which is made up of DataTables and DataRelations that represent the result of the command.

ADO stands for ActiveX  Data Object .ADO.NET is an object-oriented set of libraries that allows  to interact with data sources.  The data source is a database, but it could also be a text file, an Excel spreadsheet, or an XML file.ADO .NET consists of classes that allow a .NET application to connect to the data source, executes commands and manage disconnected data. One of the key Differences between ADO.NET and other database technologies is how it deals with Challenge with different data sources, that means, the code you use to connect to an SQL Database will not differ that much to the one connecting to an Oracle Database.

ActiveX Data Objects

Microsoft developed ActiveX Data Objects (ADO) as a COM( Component Object Model ) wrapper around OLE DB for Databases.

using System;
using System.Data;
using System.Data.OleDb;

// Step 1.Open Database Connection
OleDbConnection conn = new
                      OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\inventory\inventory\db\invent.mdb;");

// Step 2.Connection database opened 
conn.Open();

// Step 3.Create DataSet and Command objects
OleDbCommand cmd = new OleDbCommand(
                            "SELECT * FROM empr4r",
                            conn);

// Step 4.Execute the command
cmd.ExecuteScalar();

// Step 5.Closed this connection 
conn.Close();

using System;
using System.Data;
using System.Data.OleDb;

// Step 1.Open Database Connection
OleDbConnection conn = new                     OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\inventory\inventory\db\invent.mdb;");

// Step 2.Connection database opened 
conn.Open();

// Step 3.Create DataSet and Command objects
OleDbCommand cmd = new OleDbCommand(
                            "SELECT * FROM empr4r",
                            conn);

// Step 4.Execute the command
cmd.ExecuteScalar();

// Step 5.Closed this connection 
conn.Close();


Goto Page:

1 2 3 4 5 6 7 8
ADO.net Objective Questions And Answers

ADO.net Objective Questions And Answers

ADO.net Interview Questions And Answers

ADO.net Interview Questions And Answers


R4R,ADO.net Objective fresher and experienced, ADO.net Subjective fresher and experienced ,ADO.net Interview Questions And Answers,ADO.net fresher and experienced,ADO.net Interview fresher and experienced ,ADO.net Questions fresher and experienced,ADO.net Answers fresher and experienced