MySqlCommand command = GetDatabaseConnection().CreateCommand();
MySqlDataAdapter mda = new MySqlDataAdapter();
DataTable dt = new DataTable();
command.CommandType = CommandType.Text;
string sqlStatement = "select * from table";
command.CommandText = sqlStatement;
mda.SelectCommand = command;
mda.SelectCommand.Connection = GetDatabaseConnection();
mda.Fill(dt);
command.Dispose();
return dt;
This will work for all the types of column
Have you tried like this??
Hope this will help.