資料庫連結失敗!

SELECT ER_Bank, ER_CashBuy, ER_CashSale, ER_CashDiff, ER_SpotBuy, ER_SpotSale, ER_SpotDiff FROM ExchangeRate WHERE ER_Currency = 21 ORDER BY ER_Bank

System.InvalidCastException: Object cannot be cast from DBNull to other types. at System.DBNull.System.IConvertible.ToInt32(IFormatProvider provider) at System.Convert.ToInt32(Object value, IFormatProvider provider) at MySql.Data.MySqlClient.Driver.LoadCharacterSets() at MySql.Data.MySqlClient.Driver.Configure(MySqlConnection connection) at MySql.Data.MySqlClient.NativeDriver.Configure(MySqlConnection conn) at MySql.Data.MySqlClient.MySqlConnection.Open() at ccioo.Data.DB_MySQL.ExecuteReader(String myQuery)