One dataset == Multiple Datasets

for a program im developing (thankfully not a syspro) i have a dataset that im taking folders names and the items in the folders and parsing the data inside of them to a spreadsheet. The program goes well, but they want to be able to have different exports for each type of file. (well each type of prefix) I thought about different Datasets for each of their prefixes but that would be over 20 tables... way too many to fit on a single form. Is there any way for me to select a rows based on a certain column? I know i can go through a loop and do a for each line and do it that way but i figure why reinvent the wheel.... if its already invented?
Who is Participating?
Moizsaif123Connect With a Mentor Commented:
This is a link for creating multiple datasets and filling them. They specify datarelations between diff datatables and show how to pull data from either or both tables.

Another link that shows how to add rows to datatable and edit them

Added pseudo code below for various data manipulation if needed where you can add column rows and such.
'declare a new instance for datatable
dim worktable as datatable=new datatable("person")

'declare column datatype
dim column as DataColumn = new DataColumn
column.DataType = System.Type.GetType("System.Decimal")

'Add column to dataset

'iterating through dataset
for i as integer =0 to custDS.tables(0).rows.count - 1

'updating a datarow via searching criteria
Dim customerRow() As Data.DataRow
customerRow = DataSet1.Tables("Customers").Select("CustomerID = 'ALFKI'")

customerRow(0)("CompanyName") = "Updated Company Name"
customerRow(0)("City") = "Seattle"

Open in new window

well can't you do one dataset with multiple data tables?  That's how you usually pass data to a crystal report app that takes more than one report.
jnspradAuthor Commented:
I dont belive ive delt directly with datasets before, im just now touching on them. I usualy let Visual Studio take over the whole ordeal. How would i make different datatables?
and more yet, how would i add a row to a specific table inside of a dataset
jnspradAuthor Commented:
Ok, well itl take a littlle work but the code given will work. Thanks so much
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.