Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

ADO.

NET Part 1
Accessing Databases in VB.NET
Introduction to ADO.NET, Read and Navigate
through records

Ishara Wimaladasa (BSc,Pg dip in IT, NDTVE)


ActiveX Data Objects
 ADO.NET has a number of classes that :
◦ Retrieve Data
◦ Manipulate Data
◦ Update Data
 VB,C#, C++, J#

2
ADO vs. ADO.NET
 ADO works great, but:
◦ Requires COM and Windows
◦ Record sets don’t travel well over the Internet
◦ Connected behavior is hard to work with

 Requires more code


◦ ADO.NET solves these problems
◦ Uses XML under the covers for all data transport
◦ No special code needed to marshal across the Internet

3
Disconnected?

 ADO.NET offers the capability of working with


databases in a disconnected manner.

 An entire database table can be retrieved to a local


computer/temp file if it is a network database.

 A connection could also be constant

4
Web-Centric Applications
 Download the data and process it at a local
level.
 If changes are made, the connection can be
remade and the changes posted.
 The database could be LAN or Internet based.

5
Data Providers
 MS SQL Server 7.0+
 Oracle
 OLE DB (old SQL & Access- Jet 4.0)
 Open Database Connectivity (ODBC)-
earlier Visual Studio, Access Driver, ODBC
for Oracle

* Version 1.0 does not include ODBC

6
ADO.Net Classes

7
ADO.Net Classes

8
ADO.Net Classes

9
ADO.Net Classes

10
Time to try it!

11
Choices?

 Using ADO.NET we
can either display
information in a:
◦ DataGrid
◦ Individual
Controls

12
Fill data into a list box from
database

tblPerson table of
empInfo.accdb
database

frmDisplayEmployee
form

13
Fill data into a list box from
database

14
Display data in textboxes

15
Display data in textboxes

16
End of the Lecture

 Any
Reference
 ADO.NET
Accessing Databases in VS.NET,
Professor Corinne Hoisington
 Kuppiya.com
 https://youtu.be/RecQL-7ahhU
 https://youtu.be/P9hKTDCq1QY
 https://youtu.be/Ylszu3GUpTo

18

You might also like