Link to home
Start Free TrialLog in
Avatar of keithflash
keithflash

asked on

Data Adapters and Datasets (vb.net - VS2010)

Hello,

This is my 1st .net project and I'm using VB.net (vs2010).   Apologies if I'm using incorrect terminology.   Just trying to get going using the data objects.  

I've got a project started where I have set up a data source object (POSDataSet.xsd).    When I browse this object, I can see all of the table names and fields in the database.

In this project, I can see the following objects

POSDataSet  Object Type = Dataset
PurchaseOrder      Object Type = DataTable
PurchaseOrderTableAdapter = TableAdapter

Could someone provide a quick code sample of how I would use these objects to display the data in the Purchase Order Table?

Thanks in advance
Avatar of FamousMortimer
FamousMortimer
Flag of United States of America image

You can display it in a datagridview like so

Datagridview1.DataSource = PurchaseOrder.Dataset.Tables(0).DefaultView
Avatar of keithflash
keithflash

ASKER

What would you do prior to this command as far as instantiating objects and such?

Thanks
I guess I'm having the most trouble understanding/using the data adapter object to fill the data table or data set.   Just from reading, it seems like this is what I need to do.    Am I off base on this?

The material I've read indicates that you need a connection object, a data adapter, and a data set.    I've really been having trouble communicating with these items and/or feeding them the correct arguments.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of FamousMortimer
FamousMortimer
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial