Imports cell from DataTable
I have a DataTable with many Columns
i want to imports Data From one Column and add it to a variable
How do i do it in VB ?
I have a DataTable with many Columns
i want to imports Data From one Column and add it to a variable
How do i do it in VB ?
usually its something like this:
Dim theColumnItem as Object = theDataTable.Rows(index).ItemArray(index)
or
Dim theColumnItem as object = theDataTable.Rows(index)(ColumnName)
does this answer your question?
you have 2 ways
Dim theResult as Integer
If Integer.TryParse(theColumn.ToString(), theResult) then
'successfully converted "theColumn" object to an Integer and result is saved in "theResult"
end if