ODP.NET gives ORA-22806 on update with fully defined names
25033Mar 29 2006 — edited Dec 11 2012Just thought I'd post my experience since I found nothing on this issue when I had the problem. I figured it out, so hopefully it will help someone in the future.
I was updating some records using array binding. For example:
UPDATE MySchema.MyTable SET MySchema.MyTable.MyField = :varValue
WHERE MySchema.MyTable.MyIDField = :varIDValue;
and I was getting
ORA-22806: not an object or REF
Array Bind Error: ORA-22806: not an object or REF
After a few painful hours, I finally figured out that it did not like the fully defined naming. When I changed my query to:
UPDATE MyTable SET MyField = :varValue WHERE MyIDField = :varIDValue;
It worked perfectly. Also note, that INSERT statements seem to work fine with fully defined column and table names - I only had a problem with update statements.
This was tested and confirmed in Oracle 9i and 10g R1 and R2 database instances.