Page 1 of 1

OCI invalid handle in sending blob to OracleObject

Posted: Tue 16 Feb 2021 10:23
by dqrest
Hello!
I use the following components:
1) dotConnect for Oracle Professional 9.14.1180
2) MS VS 2019
3) Oracle Client 12c 12.2.0.1.0 x86

Then I call the oracle method to pass blob.

Code: Select all

public void SetItem(TVariantNamed tVariantNamed)
{
      OracleParameterCollection xparams = new OracleParameterCollection()
      {
            new OracleParameter("pItem", OracleDbType.Object, tVariantNamed.OracleObject, ParameterDirection.Input),
      };
      OracleObject.ExecuteMethod(_connection, "SET_ITEM", xparams);
       if (xparams.Contains("self") && xparams["self"].Value as OracleObject != null)
                this.OracleObject = xparams["self"].Value as OracleObject;
}
If tVariantNamed.OracleObject store blob, then I have the error "OCI invalid handle". But, when tVariantNamed.OracleObject store string or numeric data, then there is no any error.
Note that the following code was successfully executed for dotConnect for Oracle Professional 6.60.258 and Oracle Client 12c 12.2.0.1.0 x86:

Code: Select all

public void SetItem(TVariantNamed tVariantNamed)
{
      OracleParameterCollection xparams = new OracleParameterCollection()
      {
            new OracleParameter("pItem", OracleDbType.Object, tVariantNamed.OracleObject, ParameterDirection.Input),
      };
      OracleObject.ExecuteMethod(_connection, "SET_ITEM", xparams);       
}
Note that for obtaining the result in dotConnect for Oracle Professional 9.14.1180 you should find in xparams the "self" parameter, but in dotConnect for Oracle Professional 6.60.258 there is no any necessity.

What happend? How to solve this problem?
Thanks!

Re: OCI invalid handle in sending blob to OracleObject

Posted: Wed 24 Feb 2021 17:47
by Shalex
dqrest wrote: Tue 16 Feb 2021 10:23 Note that for obtaining the result in dotConnect for Oracle Professional 9.14.1180 you should find in xparams the "self" parameter, but in dotConnect for Oracle Professional 6.60.258 there is no any necessity.
dqrest wrote: Tue 16 Feb 2021 10:23 If tVariantNamed.OracleObject store blob, then I have the error "OCI invalid handle". But, when tVariantNamed.OracleObject store string or numeric data, then there is no any error.
Thank you for your report. We will investigate both issues and notify you about the result.

Re: OCI invalid handle in sending blob to OracleObject

Posted: Sat 03 Apr 2021 11:52
by Shalex
The bug with calling OracleObject.ExecuteMethod(), when OracleObject is created in application code without assigned attributes, is fixed in v9.14.1228: https://forums.devart.com/viewtopic.php?f=1&t=44776.