Autonumbering on linked (Oracle) tables?

M

MarkD

I guess this is more of an Oracle question, but surely
some access developers have worked with Oracle...

Using Access 2000.

I have a linked Oracle table and am using that linked
table in a form. I need to have a field that performs like
an autonumber field would with a native access table, but
I'm not sure how to do that in Oracle. would it be a
combination of a sequence and a trigger? Is there a way to
increment a sequence via Access?

Thanks,
-Mark

PS. If there are any other Access/oracle developers, I'd
appreciate any other gotchas I might run into while
dealing with oracle tables with an access front end.
 
L

Lynn Trapp

The easiest way to do that is to create a Sequence in Oracle and use an On
Insert Trigger to get the .NextVal and insert it into the table for you. Be
aware that Sequences in Oracle are just like AutoNumbers in Access...they
can and will develop gaps but that shouldn't matter because they are also
designed to provide a unique identifier for rows (at least that's the most
common use of them) like AutoNumbers are in Access.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top