Get all arrays of all DATAROW objects.
[Visual Basic]
Overloads public function select () as dataroW ()
[C #]
Public DataRow [] SELECT ();
[C ]
PUBLIC: DATAROW * SELECT () [];
[Jscript]
Public function select (): DATAROW [];
return value
Array of DataRow objects.
Note
The method returns the current row in the order of primary key (if there is no primary key, follow the order of adding).
Example
[Visual Basic, C #, C ] The following example returns an array of DataRow objects via the SELECT method.
[Visual Basic]
Private sub getRows ()
DIM MyROWS () AS DATAROW
DIM MyTable As DataTable
'Get the datatable of a dataset.
MyTable = DataSet1.tables ("suppliers")
Myrows = myTable.select ()
DIM I as integer
'Print The Value ONE Column of Each DataRow.
For i = 0 to myrows.getupperbound (0)
Console.Writeline (MyRows (i) ("CompanyName"))
Next I
End Sub
[C #]
Private void getRows () {
Datarow [] myrows;
DataTable myTable;
// Get the datatable of a dataset.
MyTable = dataset1.tables ["suppliers"];
Myrows = myTable.select ();
// Print The Value ONE Column of Each DataRow.
For (int i = 0; i Console.writeline (MyRows [i] ["CompanyName"]); } } [C ] Private: Void getRows () { DataRow * Myrows []; DataTable * myTable; // Get the datatable of a dataset. MyTable = DataSet1-> Tables-> Item [s "support"]; Myrows = myTable-> select (); // Print The Value ONE Column of Each DataRow. For (int i = 0; i Console :: WriteLine (Myrows [i] -> Item [S "CompanyName"]); } } [JScript] There is no example available for JScript. To view Visual Basic, C # or C examples, click the "Language Filter" button in the upper left corner. Claim Platform: Windows 98, Windows NT 4.0, Windows Me, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 Series, .NET FRAMEWORK Lite, please see DataTable Class | DataTable Member | System.Data Name Space | DataTable.Select Overloaded list | CaseSensitive | DataRow