Skip to Main Content

Oracle Database Express Edition (XE)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem with Primary Key 'auto increment' - Oracle XE 10g

751747Sep 10 2010 — edited Sep 24 2010
I have a program written in VB6 with ADO database connection and I've migrated from Access 2003 database to Oracle XE. I did the whole migration using SQLDeveloper and the new database seems to be working fine. I'm doing some queries in VB to retrieve data and it's working fine.

However, when I try to insert a new record inside one of my tables, it shows me the following error at the PK table field:

ORA-01400 - Not possible to insert NULL in ("DBVAGAS"."LOG"."ID_LOG")

This "id_log" field is the primary key and it was an auto increment field in Access. I've seen through APEX that the migration has created a sequence for this field (see below), but it seems that the sequence is not being activated when I give the .addnew command in VB. What may I have to do to activate the sequence command within the .addnew recordset?

here is the sequence created automatically during Access -> OracleXE migration:

CREATE SEQUENCE "LOG_ID_LOG_SEQ" MINVALUE 1 MAXVALUE 999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE
/


Thanks for reading.

Edited by: user9081908 on 10/09/2010 05:55

Edited by: user9081908 on 10/09/2010 05:58
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 22 2010
Added on Sep 10 2010
9 comments
3,280 views