ORA-01008: not all variables bound

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Sieme
Posts: 3
Joined: Fri 31 Oct 2014 14:29

ORA-01008: not all variables bound

Post by Sieme » Fri 31 Oct 2014 15:14

Hi,

We are making use of dotConnect for Oracle 8.4.274.

We have a problem with a merge statement query contains the same variable twice in one query. This generates a 'ORA-01008: not all variables bound' exception. If I rename one instance of this name (so :name becomes :name_) then the exception does not occur anymore. If I change the connection string from direct=true to not direct then the error also disappears. This problem also didn't occur prior to upgrading to 8.4.274 with the exact same query.

Is this a know issue with a known solution? (I would like to simply be able to continue using the same variable name twice in one query)

Regards,
Sieme

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: ORA-01008: not all variables bound

Post by Pinturiccio » Mon 03 Nov 2014 14:48

We could not reproduce the issue. Please create and send us a small test project with the corresponding DDL/DML scripts that reproduces the issue.

Sieme
Posts: 3
Joined: Fri 31 Oct 2014 14:29

Re: ORA-01008: not all variables bound

Post by Sieme » Tue 04 Nov 2014 11:11

The query is rather simple and used to work fine (it still does if you run it in oracle sql developer):

MERGE INTO DataTable dt
USING dual
ON (dt.MD = :md)
WHEN NOT MATCHED THEN
INSERT (dt.MD, dt.Content) VALUES (:md, :content)

This is the devart stack trace

" at Devart.Data.Oracle.cb.d()
at Devart.Data.Oracle.bw.m()
at Devart.Data.Oracle.bw.a()
at Devart.Data.Oracle.m.a(Int32 A_0, ci A_1)
at Devart.Data.Oracle.OracleCommand.InternalExecute(CommandBehavior behavior, IDisposable disposable, Int32 startRecord, Int32 maxRecords, Boolean nonQuery)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
at Devart.Data.Oracle.OracleCommand.ExecuteNonQuery()

if you change the query to

MERGE INTO DataTable dt
USING dual
ON (dt.MD = :md)
WHEN NOT MATCHED THEN
INSERT (dt.MD, dt.Content) VALUES (:md_, :content)

..it works again with devart.

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: ORA-01008: not all variables bound

Post by Pinturiccio » Fri 07 Nov 2014 12:50

We have reproduced the issue. We will investigate it and post here about the results as soon as possible.

Sieme
Posts: 3
Joined: Fri 31 Oct 2014 14:29

Re: ORA-01008: not all variables bound

Post by Sieme » Mon 17 Nov 2014 15:01

What is the status on this?

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: ORA-01008: not all variables bound

Post by Pinturiccio » Tue 18 Nov 2014 15:38

The investigation is in progress. As soon as we have any results, we will post here.

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: ORA-01008: not all variables bound

Post by Pinturiccio » Fri 21 Nov 2014 15:44

We have fixed the bug with using the same parameter several times in a MERGE statement in the Direct mode. We will post here when the corresponding build of dotConnect for Oracle is available for download.

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: ORA-01008: not all variables bound

Post by Pinturiccio » Fri 05 Dec 2014 09:56

New build of dotConnect for Oracle 8.4.303 is available for download!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?t=30900

Post Reply