473,320 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Reading from multiple tables in a dataset

I have a form with 7 datagrids, each on a seperate tabpage and reading from
it's own dataTable. I would like to take the first three fields of each row
and show them in a listbox (for example, ID, first name and last name). I
know how to join them to create a single string and how to add them to the
listbox items collection, but is there an easy way of reading every single
row in my dataset, rather than reading each table one at a time? I seem to
have to use the same code 7 times just to add, delete, update or query the
data I.E query the Manager table, then the Cashier table, then the next, etc.

Nov 22 '05 #1
2 1645
I forgot to mention that I am working in C#

"cashdeskmac" wrote:
I have a form with 7 datagrids, each on a seperate tabpage and reading from
it's own dataTable. I would like to take the first three fields of each row
and show them in a listbox (for example, ID, first name and last name). I
know how to join them to create a single string and how to add them to the
listbox items collection, but is there an easy way of reading every single
row in my dataset, rather than reading each table one at a time? I seem to
have to use the same code 7 times just to add, delete, update or query the
data I.E query the Manager table, then the Cashier table, then the next, etc.

Nov 22 '05 #2
I was alreayd asking myself what language you where using

However probably you are looking for the the binding and the
currencymanager.

http://msdn.microsoft.com/library/de...classtopic.asp

http://msdn.microsoft.com/library/de...classtopic.asp

This is probably the right start, however next time I advise you when it
becomes probably more language related I advice you to ask it in the
newsgroup.

microsoft.public.dotnet.languages.csharp

I hope this helps so far,

Cor
"cashdeskmac" <ca*********@discussions.microsoft.com> schreef in bericht
news:EE**********************************@microsof t.com...
I forgot to mention that I am working in C#

"cashdeskmac" wrote:
I have a form with 7 datagrids, each on a seperate tabpage and reading from it's own dataTable. I would like to take the first three fields of each row and show them in a listbox (for example, ID, first name and last name). I know how to join them to create a single string and how to add them to the listbox items collection, but is there an easy way of reading every single row in my dataset, rather than reading each table one at a time? I seem to have to use the same code 7 times just to add, delete, update or query the data I.E query the Manager table, then the Cashier table, then the next, etc.

Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Piyoosh Rai | last post by:
Hi, I have multiple XML files that I am reading into a DataSet in C#. What I would want to do it Create Tables from the DataSet in the destination database and fill the tables with data from the...
3
by: Bill C. | last post by:
Hi, I've got a simple console app that just reads an XML file into a DataSet then prints out a description of each table in the DataSet, including column names and row values for each column. ...
0
by: | last post by:
Hi, I have an app that uses a typed dataset to persist user data. The dataset has a multiple tables with multiple table relations. The problem I am running into is that the user data is...
1
by: Ahmet Karaca | last post by:
Hi. myds.Reset(); mycommand.SelectCommand.CommandText= "Select att1 from Ing as Ingredient, Pro as Product "+ "where Pro.ad='apple' and Pro.id=Ing.id"; mycommand.Fill(myds, "Product"); // Here...
9
by: Graham | last post by:
I have been having some fun learning and using the new Controls and methods in .Net 2.0 which will make my life in the future easier and faster. Specifically the new databinding practises and...
1
by: sneha123 | last post by:
There will be some 20 questions and for each question there will be 4 choices.what i want to do is to select multiple answers by clicking the checkbox. i m using asp.net,vb.net pls help me we...
9
by: jaYPee | last post by:
I have search a lot of thread in google newsgroup and read a lot of articles but still i don't know how to update the dataset that has 3 tables. my 3 tables looks like the 3 tables from...
8
by: Jason L James | last post by:
Hi all, does anyone know if I can create a dataview from multiple datatables. My dataset is constructed from four separate tables and then the relationships are added that link the tables...
4
by: Dave Edwards | last post by:
I understand that I can fill a datagrid with multiple queries, but I cannot figure out how to fill a dataset with the same query but run against multiple SQL servers, the query , table structure...
7
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi All :) I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView. True DBGrid has a MultipleLines property that controls whether individual records span multiple lines. Is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.