Click here to Skip to main content
13,055,884 members (49,881 online)
Rate this:
Please Sign up or sign in to vote.
See more:

I have figured out how to do pretty much everything with DataSets in VB8. I just can't for the life of me figure out how to return the data contained in specified table, row and column. I’m sure the answer is really simple.

Please Help

Posted 14-Jul-10 20:27pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Yes it is simple.

As you say you have pretty much figured out *everything* about DataSet, then Datatable row/column access would be easy for you.
Dataset is a collection of tables (one or more).

myDataSet.Tables[0].Rows //0 for first table.
myDataSet.Tables[0].Columns //0 for first table


This should get you going.

Read all about the Dataset and tables in VB here: The Tables of a Data Set[^]
bigbro_1985 15-Jul-10 3:11am

Thanks for the Quick response.

I used:

on "[0]" I get "Identifier Expected"
and there is no Rows or Columns properties available under the property Tables.

I'm using VB8, are you using C?
Sandeep Mewara 15-Jul-10 3:19am
Updated answer with VB sample and a link that would help you in learning all about datatables n dataset.
bigbro_1985 15-Jul-10 3:33am
Reason for my vote of 5
Quick Response, Perfect Answer!
bigbro_1985 15-Jul-10 3:37am

I did this:
Label2.Text = AccommodationDataSet.Tables(0).Rows(1).Item("AFloor")

Got it to work, and it was really simple! I really deserve a boot to the head!

Thanks Again
Sandeep Mewara 15-Jul-10 3:38am
:) no issues. It happens.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170713.1 | Last Updated 15 Jul 2010
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100