Hi Guys. I am trying to export data from my Access DB to a CSV file. I have managed to get this work OK, however, I want to take this one step further in that I want to only export data in the DB that have a value of '0' in the "EXPORTED" Column. I have done the below in the export code but it gives me an error.
//Write all records in the DB
foreach (DataRow dr in dt.Rows)
if (dr["Exported"] == '0')
for (int i = 0; i < iColCount; i++)
if (i < iColCount - 1)
The error I get is as follows:
"Operator '==' cannot be applied to the operands of type 'string' and 'char'
Does anybody know how I can get past this?