OCI invalid handle in sending blob to OracleObject

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
dqrest
Posts: 32
Joined: Tue 15 Sep 2015 06:01

OCI invalid handle in sending blob to OracleObject

Post by dqrest » Tue 16 Feb 2021 10:23

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!

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: OCI invalid handle in sending blob to OracleObject

Post by Shalex » Wed 24 Feb 2021 17:47

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.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: OCI invalid handle in sending blob to OracleObject

Post by Shalex » Sat 03 Apr 2021 11:52

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.

Post Reply