I'm attempting to retrieve a certificate stored as a BLOB in an Oracle database but I keep getting an empty byte array back. Here's a code snippet:
OracleCommand command = new OracleCommand(QUERY_GETURLS, connection);
OracleDataReader reader = null;
try
{
connection.Open();
reader = command.ExecuteReader();
while (reader.Read())
{
string organization = reader["Organization"].ToString();
string type = reader["Type"].ToString();
string url = reader["DestinationUrl"].ToString();
byte[] certificate = (byte[])reader["Certificate"];
Organization, type and URL are returned fine, but the certificate field always returns an empty byte array. If I manually run the same query against the database, the BLOB column is returned. The column data type is a LONG RAW and I am using ODP.NET.
OracleDataReader readerperhaps aBinaryReaderwould work or take a look at this link devart.com/dotconnect/oracle/articles/lob.html"+1"