get row id from select array

rbreidenstein

Member
Joined
Dec 4, 2005
Messages
21
Programming Experience
1-3
i pull info into an array by doing a "array = table.select(row = 'content')"

i see array(0).rowid but i cannot pul this information out ?

any suggestions on how-to?
 
DataTable.Select returns an array of DataRow objects, so array(0) is a DataRow. To get the value of a particular column from a DataRow you use the Item property and pass either the column index or name. Item is the default property for the DataRpw class so you can omit the property name if you like, so to get the value from the "rowid" column you would use either of these:
VB.NET:
Dim id As Integer = CInt(array(0)("rowid"))
Dim id As Integer = CInt(array(0).Item("rowid"))
 
Back
Top