OCI invalid handle in sending blob to OracleObject
Posted: 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.
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:
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!
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;
}
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);
}
What happend? How to solve this problem?
Thanks!