Hello,
according to the documentation from DevArt we can get BLOB field from Oracle using the following sample code:
OracleCommand myCommand = new OracleCommand("SELECT * FROM Pictures", myConnection);
myConnection.Open();
OracleDataReader myReader = myCommand.ExecuteReader(System.Data.CommandBehavior.Default);
try
{
while (myReader.Read())
{
IF (myReader["Picture"] != DBNull.Value) <-- this part makes problem !!!
{
OracleLob myLob = myReader.GetOracleLob(myReader.GetOrdinal("Picture"));
....
However, doing this I get "The object of type System.Byte[] cannot be cast into Devart.Data.Oracle.OracleLob" error (translated from German) on the last line above.
What is wrong here?
Thanks,
Vladimir
OracleLob error
Re: OracleLob error
Thank you for your report. We have reproduced the issue and are investigating it.
As a workaround, please use
instead of
As a workaround, please use
Code: Select all
if (!myReader.IsDBNull("Picture"))
Code: Select all
if (myReader["Picture"] != DBNull.Value)
Re: OracleLob error
The bug is fixed in the newest (8.5.478) build of dotConnect for Oracle.