Vb

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Vb as PDF for free.

More details

  • Words: 286
  • Pages: 10
HANDLING DATABASE WITH ADO.NET

Two Ways to Work with Database: From a Programmer’s Perspective 1.

Using the built-in Visual Tools

3.

Using Code

Connections, Data Adapters and Datasets  These

are the objects you need to know to work with databases

 These

objects make-up the basis of ADO.NET, which is the primary access protocol in VB.NET

1. CONNECTIONS 

To work with data, you first connect to a data source to do that , you use a CONNECTION object.

4 type of connection objects  SQLConnection – recommended for MS SQL Server 7.0 or hicher  OLEDBConnection – recommended for MS SQL Server 6.5 or earlier  ODBCConnection  OracleConnection – recommended for Oracle data source

2. Adapters  After

you have a connecion object for a data source, you create a data adapter to work with that data.

 Adapter

is needed because data sets do not maintain any active connection to the database; they are disconnected from the database and connect only as needed.

Why do you need adapter?  The

adapter is in-charge of managing your connection to the data source. It is the data adapter that connects you when you need to be connnected.

 It

is the place where you store the SQL statement that will be executed on the data in the database.

 It

fills your datasets with data

Types of Adapter SQLDataAdapter 2. OLEDBDataAdapter 3. ODBCDataAdapter 4. OracleDataAdapter 1.

3. Datasets  When

you have a data adapter object, you can generate a dataset object using the data adapter.

 Datasets

are what you actually work with in your code when handling data.

DATASET CONNECTION

Data Relation

ADAPTER

Database

Table

Table

Rows

Rows

Cols

Cols Your Code

Related Documents

Vb
November 2019 60
Vb
November 2019 53
Vb
November 2019 51
Vb
November 2019 46
Vb
November 2019 34
Vb
December 2019 35