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

Home -> Community -> Usenet -> c.d.o.misc -> Re: using oracle sequence by odbc in MS ACCESS

Re: using oracle sequence by odbc in MS ACCESS

From: Nicholas Couch <nbcouch_at_envisionet.net>
Date: Tue, 16 Mar 1999 15:25:14 GMT
Message-ID: <36ee7694.1598846@mindmeld.idcomm.com>


The way I deal with sequences in Access is to create a pass-through query. In your case it would look something like

select myseq.nextval from dual

To get the next sequence value you simply open this query. To create a pass-through query, open a new query, go to the Query menu and choose SQL-Specific and then Pass-through. Then type in your SQL.

nbc

On Tue, 16 Mar 1999 14:59:25 GMT jos.leurs_at_clearviewcc.com (Jos Leurs) wrote:

>I try to use an oracle sequence in ms access
>
>In oracle I created a
>sequence
>
>called my sequence
>
>
>I created a function
>
>
>create function incrementmyseq (X IN INTEGER) RETURN INTEGER
>IS
>
>l_status integer default 0;
>
>BEGIN
>Select foo.mySEQ.NextVal Into l_status
>From DUAL;
>
>RETURN l_status1;
>/* Process any Exceptions */
>EXCEPTION
> WHEN OTHERS THEN
> Return 0;
>
>END ;
>
>
>then I created a view
>
>create view myseqinc as
>select incrementmyseq(1) myseq from dual;
>
>
>
>I linked the view myseqinc to a access db ( by odbc)
>
>and know when I open the view in access
>
>the only value I can see for
>myseq is
>
>#Deleted
>
>
>When I do a session with sqlplus
>
>I can see that the value of myseq has been increased by 10
>
>That is not what I want.
>1. I just want it to be increased by 1 , and in this case I already
>tried to configure the init.ora on the cache of sequences which did
>not work and the no cache option of the seqence did not work either.
>
>2. I want to see the value of the increased sequence in access
>
>Can somebody help me
Received on Tue Mar 16 1999 - 09:25:14 CST

Original text of this message

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