|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
array in datasethey all,
what's the best way to get records in a dataset into an array? Thanks, rodchar rodchar wrote:
> hey all, Isn't it already?> > what's the best way to get records in a dataset into an array? > > Thanks, > rodchar If you take the datatable that is inside the dataset, it is just an array or datarows. DataTable.Rows(Y)(X) Chris Rod, I use a loop structure similar to:
For i = 0 To myDataSet.Tables(0).Rows.Count For j = 0 To myDataSet.Tables(0).Columns.Count If IsDBNull(myDataSet.Tables(0).Rows(i)(j)) = False Then myarray(i, j) = myDataSet.Tables(0).Rows(i)(j) End If Next j Next i Ron Dahl Rodchar,
A dataset cannot hold anything except datatables. Can you be a little bit more clear? Cor "rodchar" <rodc***@discussions.microsoft.com> schrieb Dunno if this helps:> hey all, > > what's the best way to get records in a dataset into an array? Dim a As DataRow() ReDim a(dt.Rows.Count - 1) DirectCast(dt.Rows, ICollection).CopyTo(a, 0) Armin
Re-post, Help really needed here ! Dataview binded to Textbox for edits, I can't save the change.
Create a custom collection How to re-acquire the Text from a combo box Anyone used Socketwrench? COBOL Packed decimal converter to VB decimal Capture and redirect TCP traffic Waiting for a process/program to start updating listbox with database update computer properties in vb.net filewatcher file modification |
|||||||||||||||||||||||