Friday, November 14, 2008

ArgumentException Column does not belong to table

When using ADO.Net, I got the following error:

Column does not belong to table . A simple fix will be to check if the column exists before accessing the column in the table. This can be done as follows:

if (row.Table.Columns.Contains(ColumnName))

{

// proceed here

}

1 comment:

Ranjan said...

I am also getting same error, still yet to resolve. :(