var = ds.Tables(0).Rows(0)(12)
i m getting error in the above line..the application getting closed automatically..i am trying to fetch the 12th column of the table and save it in the variable 'var'
To fetch the value of 12th column, you should use 11 as the index always starts from 0.
The only possible reason that the application is crashing could be, you are accessing column which does not exists.
Edited 4-Oct-12 2:55am
Put the Proper Try Catch block to see the actual error.
put the section of code into the Try catch for catching the exception and preventing application to close directly.
The column/row index is always start from the 0 in the DataSet table
Edited 4-Oct-12 3:02am
Try this one for retrieving 12th column value
Dim d = ds.Tables(0).Rows(0).Item(11)
Dim d As String = ds.Tables(0).Rows(0)(11)
Edited 4-Oct-12 3:27am
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)