I have a public class that I need to save as a Blob in Oracle. I built the DataLayer to be able to work with Oracle or MySQL, so DBType is the standard method of adding parameters. Now the problem is that because the datalayer was written to be agnostic, I'm using DBType when creating parameters. However, when you create a blob parameter in oracle, usually people use OracleDBType. There is no DBType.blob. I tried using DBType.object, but that gave me an error.
IDbCommand command = ProviderManager.factory.CreateCommand();
command.CommandText = commandText;
command.Connection = connection;
command.CommandType = commandType;
DbParameter dbParam = ProviderManager.factory.CreateParameter();
dbParam.ParameterName = "Summary";
dbParam.Value = batchSummary;
dbParam.Direction = parameterDirection;
dbParam.DbType = DbType.Object;
command.Parameters.Add(dbParam);
command.ExecuteNonQuery();
This was the error I received:
Oracle.ManagedDataAccess.Client.OracleException: 'Unsupported column datatype'