Dataset question

  • Thread starter Thread starter Nikolay Petrov
  • Start date Start date
N

Nikolay Petrov

how to assign data from a dataset to an array or other variables?
how to address data, contaning in dataset.
I know it is organized in row, but how to work with them?
 
Hi,
Datasets contain one or more DataTables which in turn contain DataRows. To
access a specific row in a table, follow this hierarchy.

DataSet.Tables(0).Rows(0)("ColumnName") -- gives the value of column
"ColumnName" in the first row (0-based indexing) of the first table in the
given dataset.

Also, check MSDN for DataSet topic. It contains plenty of info on
manipulating/accessing datasets.

Hope this helps.

how to assign data from a dataset to an array or other variables?
how to address data, contaning in dataset.
I know it is organized in row, but how to work with them?
 
dataset.tables("tableName").Rows(rownumber)(columnNumber)
dataset.tables("tableName").Rows(rownumber)("ColumnName"))

dim datarow as new datarow = dataset.tables("tableName").Rows(number)
messagebox.show (datarow(columnNumber)
messagebox.show (datarow("columnName"))

Hope this helps,

Jason
 
Thanks guys
I am sure that MSDN contains all the info
Just i don't have the time ;-)

tnx again
 
Hi Shiva,
DataSet.Tables(0).Rows(0)("ColumnName") -- gives the value of column
"ColumnName" in the first row (0-based indexing) of the first table in the
given dataset.
I am sure you know this, however I think that this can give
misunderstandings.

In my opinion it has to be "gives the value of Item". That because the
distinct between a column and an item in a datatable is for a lot of newbies
mostly difficult to see.

Only for the next time.

:-)

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top