Presentation is loading. Please wait.

Presentation is loading. Please wait.

IS437: Spring 2006 Instructor: Dr. Boris Jukic Interacting with a Database: ADO.Net.

Similar presentations


Presentation on theme: "IS437: Spring 2006 Instructor: Dr. Boris Jukic Interacting with a Database: ADO.Net."— Presentation transcript:

1 IS437: Spring 2006 Instructor: Dr. Boris Jukic Interacting with a Database: ADO.Net

2 Introduction to ADO.Net The basic ActiveX Data Objects model Creates a connection to the database Binds data to controls

3 customer invoice invoice line item part database Provided by Access, or Oracle, etc. Form1 Form2 … Project … Connecting the Database with the Client Application

4 customer invoice invoice line item part database Provided and Managed by Access, or Oracle, etc. Form1 Form2 … Project … ADO.Net: A Disconnected Model customer dataset resides in the local machine

5 How to create a dataset customer invoice invoice line item part … Provider Microsoft Access Microsoft Jet 4.0 OLE DB Provider Connection database Adapter customer dataset SQL 3 1 2

6 Step 1: select a provider, a database to connect to, and specific table from the database to work with. Drag the chosen table onto the form and an instance of OleDbDataAdaper ( OleDbDataAdapter1 by default) is placed in the data tray. Step 2: From the Data menu, select “Generate the dataset… How to create a dataset

7 How to create a dataset: Step 2 At the completion of Step 2, a dataset (dataset11 by default) is placed in the component tray.

8 Step 3: Fill the dataset with data. Place the following code in the form load event. OleDbAdapter1.Fill(Dataset11) OldDbAdapter1 is the name of the adapter, Dataset11, the name of the dataset. How to create a dataset

9 customer invoice invoice line item part database Managed by Access, or Oracle, etc. Form1 Form2 … Project … customer dataset resides in local machine

10 Bind data to controls


Download ppt "IS437: Spring 2006 Instructor: Dr. Boris Jukic Interacting with a Database: ADO.Net."

Similar presentations


Ads by Google