I want to store a Blob in the Database through a SP. Here's the Code for the parameter:
Code: Select all
command = (IDbConnection)_conn.CreateCommand();
command.CommandText = "FKT_SAVE_LAYOUT";
command.CommandType = CommandType.StoredProcedure;
// .. some params
IDbDataParameter param = DbProviderFactories.GetFactory("CoreLab.Oracle").CreateParameter();
param.ParameterName = "ALAB";
param.DbType = DbType.Object;
param.Direction = ParameterDirection.Input;
command.Add(param);
On this Parameter a exception is thrown: "ObjectTypeName must be specified.", but I can't specify the object name on the interface.
Additional Info: The binary data we need to save is in a Byte[].
What's your suggestion to store a Blob (average is around 0.5 to 2 MB, so DbType.Binary is not possible) in the database through the default interfaces?