Calling Oracle SP with CLOB OUT parameter (EntLib 3.1)

Topics: Data Access Application Block
Jan 21, 2008 at 11:02 AM
The Oracle (10g) SP looks like :
PROCEDURE ProcStockName(ParameterName OUT CLOB) IS ...

I use the Microsoft OLE DB Provider for Oracle (Provider=MSDAORA.1)
My code is :
string sqlCommand = "PackageName.ProcStock_Name";
DbCommand dbCommand = db.GetStoredProcCommand(sqlCommand);
db.AddOutParameter(dbCommand, "ParameterName", DbType.String, int.MaxValue);
db.ExecuteNonQuery(dbCommand);

The error is :
ORA-06502: PL/SQL: numeric or value error string

Can someone help me ?
Thanks !
Jan 21, 2008 at 4:56 PM
Try using dbCommand.AddParameter instead of AddOUtParameter. This way, you get to set the OracleType, and not DbType.

Neo.