Passing parameter that is not used in the query throws error

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
utoracle
Posts: 2
Joined: Wed 13 Feb 2019 08:36

Passing parameter that is not used in the query throws error

Post by utoracle » Wed 13 Feb 2019 09:02

I am evaluating dotConnect for Oracle and there is a use case where I pass parameters to the query even though the parameter is not used in the actual SQL query.

I have tried setting PassParametersByName property to true but it doesn't work. I get the error - ORA-01036: illegal variable name/number.

Is there a workaround for this?

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

Re: Passing parameter that is not used in the query throws error

Post by Pinturiccio » Fri 15 Feb 2019 14:03

This is the designed behaviour. You should have the same number of parameters and the same parameter names as in your query. If you have more or less parameters, Oracle generates the ORA-01036 error.

Post Reply