In C#, using SqlDataReader, is there a way to read a boolean value from the DB?
while (reader.Read()) { destPath = reader[\"destination_path\"].ToString(
How about this?
deleteExisting = (reader["delete_existing"] as int?) == 1;
Boolean is probably the easist type to convert something to. Here's the 'Y', 'N' version:
deleteExisting = string.Equals(reader["delete_existing"] as string, "Y", StringComparision.OrdinalIgnoreCase);