From: Gary England <gengland@hiwaay.net>
Subject: Re: Autonumber an Oracle field with Access97 via odbc?
Date: 1997/09/09
Message-ID: <3415D9E4.6581@hiwaay.net>#1/1
References: <340ee583.72000624@news.alt.net>
To: lhomer@xmission.com
Reply-To: gengland@hiwaay.net
Newsgroups: comp.databases.ms-access,comp.databases.oracle,comp.database.oracle



Lyle Homer wrote:
> 
> I moved an access97 table onto an oracle 7 server and am able to
> get at and update the data via odbc, but the autonumber fields no
> longer work.  (obviously, they're just number fields in the oracle
> table now)
> 
> Is there anyway to make access control the numbering of this field
> when a new record is added?  Is there such a thing as a
> psuedo-autonumber? How do I go about setting up something like this?
> 
> Thanks for any reply,
> 
> Lyle
> lhomer@xmission.com

Define a sequence generator and place a reference to it with -.nextval
appended in the INSERT command:

INSERT INTO table (record_primary_id,...) VALUES (sequence.NEXTVAL,...)

Refer to CREATE SEQUENCE in your ORACLE documentation.

Gary


