Error 'Object cannot be cast from DBNull to other types.' when trying to connect to MariaDB v10.11
説明
When trying to connect to MariaDB 10.11 in Toad Data Point, the following error appears:
System.InvalidCastException Object cannot be cast from DBNull to other types. Stack Trace: at System.DBNull.System.IConvertible.ToInt32(IFormatProvider provider) at MySql.Data.MySqlClient.Driver.LoadCharacterSets(MySqlConnection connection) at MySql.Data.MySqlClient.Driver.Configure(MySqlConnection connection) at MySql.Data.MySqlClient.MySqlConnection.Open() at Quest.Toad.MySQL.MySQLConnection.OpenInitialTestConnection() at Quest.Toad.MySQL.MySQLConnection.DoBeforeConnect() at Quest.Toad.Db.Connection.Connect(Boolean notify) at Quest.Toad.Db.Provider.BackgroundConnector.CreateBackgroundConnection()
With HeidiSQL you can connect ok.
原因
Toad Data Point currently supports MariaDB 5.5.5, 10.2.8, 10.3.2, as described in the release notes
対策
WORKAROUND: For a workaround, you should be able to connect using the "ODBC Generic" connector and specifying the ODBC driver specifically.
STATUS: Waiting for fix in a future release of Toad Data Point