Last post Apr 16, 2008 01:51 PM by dungbomb
Mar 05, 2008 08:37 AM|jon211|LINK
I currently have an Oracle stored procedure that returns a blob.
We're using MS Enterprise Library 3.1 to connect to the database and I can't find any support for lobs at all.
Anyone know if this is possible using the enterprise library?
oracle blob enterprise library
Apr 16, 2008 01:51 PM|dungbomb|LINK
Not sure if this will help you or not, but I needed to pull a BLOB back into a byte array to write it to a file. What I did was to pull the BLOB back from the database in a DataReader and use GetBytes. The code below works for me, though it is not using
a stored proc.
OracleDatabase db = new OracleDatabase(connectionString);
IDataReader dataReader = db.ExecuteReader(CommandType.Text, sqlString);
long blobLength = dataReader.GetBytes(0, 0, null, 0, 0);
byte writeBuffer = new byte[blobLength];
dataReader.GetBytes(0, 0, writeBuffer, 0, (int)blobLength);