0 Replies Latest reply: May 15, 2012 12:00 PM by jmaag RSS

    sequence nextval returns 0

    jmaag
      in a c++ program we have a select test_id_s.nextval from dual. This returns a 0 not the next value. The select statement works in sqlplus with no issues. We are running an 11g database. We originially were using msado15.dll and go the zero. We then installed 11g odp.net and got the same error. We then tried a 10g odp.net and also got the same error. Note that the same code runs fine on a 10g database. Has anyone had an issue with this? We also have tried to issue a select max(test_id) from alltests to get the maximum number instead of a sequence this also returned a zero. We have also considered using a trigger to create the sequence and post to the database, but we cannot. We have several machines that are creating testdata potentially at same time. the testid's need to be passed to the plant floor for later access from various plc's.

      Edited by: jmaag on May 15, 2012 9:59 AM