Introduction to Database Access in VB.Net


This Tutorial is all about Introduction to Database Access in VB.Net. In this tutorial you will be able to learn about Database Access in VB.Net. So lets get Started:


  • Applications communicate with a database. Firstly is to stored data. To retrieve it and to present it in a user-friendly way. Then to update the database by inserting, modifying and deleting data.
  • The data residing in a data store or database is retrieved through the Data provider.
    Various components of the data provider retrieve data for the application and update data.An application accesses data either through a Datasets or a Data readers.
  • Datasets – store data in a disconnected cache and the application retrieves data from it.
  • Data readers – provide data to the application in a read-only and forward-only mode.

Data provider

  • is used to connect into a database. Executing commands and retrieving data, storing it in a Dataset, reading the retrieved data and updating the database.

-This component is used to set up a connection with a data source.

-A command is a SQL statement or a stored procedure used to retrieve, insert, delete or modify data in a data source.

-Data reader is used to retrieve data from a data source in a read-only and forward-only mode.

-This is integral to the working of ADO.Net since data is transferred to and from a database through a data adapter. It retrieves data from a database into a dataset and updates the database. When changes are made to the dataset, the changes in the database are actually done by the data adapter.


  • is an in-memory representation of data. It is a disconnected, cached set of records that are retrieved from a database. When a connection is established with the database, the data adapter creates a dataset and stores data in it.

The DataSet class is present in the System.Data namespace. The following table describes all the components of DataSet:

-contains all the tables retrieved from the data source.

-contains relationships and the links between tables in a data set.

– contains additional information, like the SQL statement for retrieving data, time of retrieval, etc.

-consists of the DataRow and DataColumn objects. The DataTable objects are case-sensitive.

-It is used to relate two DataTable objects to each other through the DataColumn objects.

-contains all the rows in a DataTable.

-It represents a fixed customized view of a DataTable for sorting, filtering, searching, editing and navigation.

-It represents the column that uniquely identifies a row in a DataTable.

-It represents a row in the DataTable. The DataRow object and its properties and methods are used to retrieve, evaluate, insert, delete, and update values in the DataTable.

-represents all the columns in a DataTable.

-consists of the number of columns that comprise a DataTable.

Connecting to Database:

The .Net Framework provides two types of Connection classes

  • SqlConnection – designed for connecting to Microsoft SQL Server.
  • OleDbConnection – designed for connecting to a wide range of databases, like Microsoft Access and Oracle.

If you have any comments or suggestions about on Introduction to Database Access in VB.Net, please feel free to contact our webpage.

Other Articles Readers might read:





Facebook Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.