Hi,

I'm having a problem trying to check for existence of a column in my datatable.

In my code i'm trying to check if the column "AmountID" exists in the datatable or not...
VB Code:
  1. If IsNothing(objDT.Columns("AmountID")) then
  2. .
  3. .
  4. .
  5. End If
If the column is present then its fine, but in case it does NOT exist then i get some error like this...
Exception Details: System.ArgumentException: Column 'AmountID' does not belong to table tblUpdateRates.

Any help will be much appreciated...
thanks in advance