1 / 10

IS437: Spring 2006 Instructor: Dr. Boris Jukic

IS437: Spring 2006 Instructor: Dr. Boris Jukic. Interacting with a Database: ADO.Net. Introduction to ADO.Net. The basic ActiveX Data Objects model Creates a connection to the database Binds data to controls. Connecting the Database with the Client Application. database. Project.

Télécharger la présentation

IS437: Spring 2006 Instructor: Dr. Boris Jukic

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. IS437: Spring 2006Instructor: 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. Connecting the Database with the Client Application database Project invoice Form1 Form2 … customer invoice line item part … Provided by Access, or Oracle, etc.

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

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

  6. How to create a dataset • 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…

  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. How to create a dataset • 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.

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

  10. Bind data to controls

More Related