My query to get a tinyint(1)
field from a table in mysql in as below
mysqlcommand.selectquery="select vehicletype from vehicles where id=1"
possible values for vehicletype
is 1 to 7
but the output in the datatable
row for the field is shown as boolean
datatable dtresult;
mda.Fill(dtResult);
DataRow dr = dtResult.Rows[0];
//dr["vehicletype "]=false if 0
//dr["vehicletype "]=true if 1
//dr["vehicletype "]=true if 2
//dr["vehicletype "]=true if 3
//dr["vehicletype "]=true if 4 etc...
when i see the value of dr["vehicletype "]
in visual studio it shows as false
for 0 and true
for any other value. How can i prevent it from default conversion