UPDATE: Found Solution! Will CAST the BIT column into INT as CAST( BitColumn AS INT ) as IntColumnIs there a way to determine in code the type of value in a column of a data set? Here is example:
DataTable myTable = myDataSet.Tables[0];
DataRow dr = myTable.Rows[0];
// Row dr has a column ACCESS_ENABLED. I need to know if the type is Int or Bit (True/False)
What happened is that sometimes this column is integer and I check if the value 1 using the following method:lUserHasAccess = dr["ACCESS_ENABLED"].ToString().Equals("1");
But if the value of the column is True (type in SQL Server is BIT) it always returns False. So I need to change the code to evaluate the type.