This discussion is archived
0 Replies Latest reply: Dec 4, 2012 8:37 PM by 973519 RSS

Returning id into :variable not working in Managed but OK in wrapped.

973519 Newbie
Currently Being Moderated
Hi guys... this query works ok in oracle.dataAccess but not in Oracle.ManagedDataAccess.
Connector does not raise an error. It just stalls.
            Dim PKRetrieveCommand As New OracleCommand : PKRetrieveCommand.Connection = JobConnection
                PKRetrieveCommand.CommandText = " INSERT INTO TMP_SEQ (FIELD1) VALUES (DBOID_SEQ.NEXTVAL) RETURNING FIELD1 INTO :dboid"
                PKRetrieveCommand.Parameters.Add("dboid", OracleDbType.Decimal, ParameterDirection.Output)

            PKRetrieveCommand.ArrayBindCount = allInserts.Length
            PKRetrieveCommand.ExecuteNonQuery()
TMP_SEQ Is a temporary table that deletes rows on commit, Field1 is a numeric type and DBOID_SEQ. is a sequence.
Thank you very much. Please advise on work-around.

Thank y'all.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points