Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Oracle and MS-Access sequence problems

Re: Oracle and MS-Access sequence problems

From: <Mary.M.Spence_at_GPC.COM>
Date: Fri, 19 Jan 1996 09:20:39 -0500
Message-Id: <9601200157.AA27627@alice.jcc.com>


Use a before insert trigger on the table to plug the 'nextval' of the sequence number into that column.

create or replace trigger foo_bi

   before insert on foo
   for each row
   when (new.rec_id is null)
begin

   select sequence_num.nextval into :new.rec_id from dual; end;

MM



| From: ORACLE database mailing list.
| To: Multiple recipients of list ORACLE-L; Spence, Mary M.
| Subject: Oracle and MS-Access sequence problems
| Date: Thursday, January 18, 1996 6:40PM
|
| DATE: Jan 18 15:27:10 1996 -06:00 relative to GMT
| X400-Recipients:
| O=GPC; S=Spence; G=Mary; I=M
|
| IPMessageID: 199601182149.QAA20104(a)so.scsnet.com
|
| FROM: ORACLE database mailing list.
|
| AUTHORIZED: Thiele, Dave
|
| TO: Multiple recipients of list ORACLE-L
|
| SUBJECT: Oracle and MS-Access sequence problems
| REPLY TO: ORACLE database mailing list.
|
| IMPORTANCE: normal
| AUTO FORWARDED: FALSE
| PRIORITY:
|


 --
| X-To: "ORACLE-L_at_CCVM.SUNYSB.EDU" <ORACLE-L_at_CCVM.SUNYSB.EDU>
|
| Hi,
|
| We've run into a snag with processing Oracle tables attached to a Microso=
| ft
| Access Database. =20
|
| We want to be able to use Oracle's Sequence generator to
| create unique ID's on row-inserts, but have been unable to get MS-Access =
| to
| recognize any way to accomplish this - it doesn't recognize the SQL state=
| ment
| with the "<sequence>.nextval" in it.
|
| Any ideas ??
|
|
| Dave Thiele - University of Wisconsin Stevens Point
| dthiele_at_ems1.uwsp.edu
|
|
|
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
| =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
| Dave Thiele
| Administrative Information Systems
| University of Wisconsin - Stevens Point
| 004-SSC Stevens Point, WI 54481
| Tel: 715-346-3904
| Fax: 715-346-2558
| Email: dthiele_at_ems1.uwsp.edu
|
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
| =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
|
|
Received on Fri Jan 19 1996 - 20:57:59 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US