Friday, 25 May 2018

ADO.NET


ADO.NET (ActiveX Data Objects)

.NET uses ADO.NET (Activex Data Objects) as its primary data access and manipulation protocol.

Database programming can be done thru Controls and Coding.

Database Programming can be done using MS Access, Oracle, MS SQL Server or any ODBC Complaint Database. (Open Database Connectivity).

Steps for database programming :

  • Establish connection with database using respective provider and driver.
  • Open database.
  • Store, Delete, Modify or Read data.
  • Show/Process the data
  • Close database.

Required Namespaces for Providers

ACCESS System.Data.Oledb
Oracle System.Data.OracleClient
SQL Server System.Data.SqlClient
ODBC System.Data.ODBC

Classes of respective Namespaces

ACCESS Oracle SQL Server ODBC
OleDbConnection OracleConnection SqlConnection OdbcConnection
OleDbDataAdapter OracleDataAdapter SqlDataAdapter OdbcDataAdapter
OleDbDataReader OracleDataReader SqlDataReader OdbcDataAdapter
OleDbCommand OracleCommand SqlCommand OdbcCommand
DataSet(System.Data) DataSet DataSet DataSet

Connected Database Programming :

In this type of program client is always connected with server and data is retrieved from it continuously. If you close the connection then we can’t read data. In this type of programming we have to use SqlConnection, SqlCommand, SqlDataReader Classes.

Sequence to use classes in CONNECTED Database Programming

  1. OledbConnection
  2. OledbDataReader
  3. OledbCommand

50 comments:

  1. 1103BGalilea256C914 April 2024 at 09:49

    CD884
    ----
    ----
    matadorbet
    ----
    ----
    ----
    ----
    ----
    ----

    ReplyDelete
  2. 9E0E0Kevin9C1C815 April 2024 at 04:04

    FD066
    ----
    ----
    matadorbet
    ----
    ----
    ----
    ----
    ----
    ----

    ReplyDelete

Introduction to C# .NET

It  is  pure  object  oriented  programming  language.  Also  it  is  Event Driven Programming Language. It is case sensitive. ...