Question: Is there any way to prevent the conversion from TINYINT(1) to boolean? Or perhaps convert it to int instead?

My TINYINT(1) column can have data such as 0, 1, 2, 3. But it is being converted to False, True, True, True respectively.

Here is the code that I currently use:

```
using (Cmd = new MySqlCommand())
{
    Cmd.Connection = Conn;
    SetQuery();

    using (var dt = new DataTable())
    {
        dt.Load(Cmd.ExecuteReader());
        ObjectList = dt.AsEnumerable().ToArray();=
    }

    Parse();

    return ObjectList != null;
}

```

Hope you can help me with this problem.

Thanks in advance.

Answer: 
`TINYINT` is basically 1 `byte` in SQL Server, and its .Net equivalent is `byte`. 
You can do this in multiple ways, have a look.

```
int x = (int)(byte) reader["column"];
int x = (byte) reader["column"];
int x = reader.GetByte(column);

```

Refere [SQL Server Data Type Mappings](https://msdn.microsoft.com/en-us/library/cc716729.aspx)
Though your posted code nowhere shows the actual conversion from `TINYINT(1)` to `boolean` as you mentioned but you can try casting it to `byte` like

```
(byte)rdr["columnwithtinyintdatatype"];

```