Oracle SQL error: ORA-22816: unsupported feature with RETURNING clause

Oracle SQL error: ORA-22816: unsupported feature with RETURNING clause

aziegler3aziegler3 Posts: 47Questions: 11Answers: 1

This is an instance of Editor.
I get this error when creating an entry in Oracle.
Any ide of where can I start to look for the issue?
Editions work well. It is only in new entries where I get this.

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    What version of Oracle are you using please? Also are you using our .NET or PHP libraries, or something custom on the server-side?

    Allan

  • aziegler3aziegler3 Posts: 47Questions: 11Answers: 1

    Sorry. I should include that info
    Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 -
    Production Version 19.3.0.0.0

    I am using the PHP libraries.

    The server side processing is based on the example in
    https://editor.datatables.net/examples/simple/server-side-processing.html
    It generates Data Tables fine.
    Also, it works well when making editions to tables.
    The issue is only when inserting data

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Thank you. This is where it inserts the RETURNING statement on insert. That is used to get the primary key value for the row that was created so we can then reference and use it.

    What is the column type of your primary key? Is it called id or are you overriding the Editor default?

    Allan

  • aziegler3aziegler3 Posts: 47Questions: 11Answers: 1

    The primary key is a number(38).
    It is called OBJECTID. Yes. I am overriding the default.

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    So if you do something like:

    INSERT INTO yourTable (col1, col2)
    VALUES ("A", "B")
    RETURNING OBJECTID;
    

    directly in the database, does that also give the error? I'm wondering if the fact that it is such a large number is causing it to be an object that Oracle can't work with for RETURNING.

    If you try the same with a simple integer for the primary key, does it then work?

    Allan

Sign In or Register to comment.