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: How to return variable

Re: How to return variable

From: <tomscott_at_nospam.abac.com>
Date: Tue, 13 Oct 1998 14:56:29 GMT
Message-ID: <362369da.89264807@news1.abac.com>


The sql that retrieves the next value is:

    "SELECT my_sequence.NextVal FROM DUAL;"

>Greetings,
>
>I'm using VB and ADO to retrieve a calculated varible from Oracle. The SQL
>statement is as follow
>
>Declare
> v_NextSequence Number;
>Begin
> 1. Retrieve the next sequence number for a table;
> 2. Use the next sequence number to insert a new record;
> 3. ??? I would like to return the v_NextSequence variable to the VB
>client. This is where I can't figure out. ???;
>End;
>
>I tried "Return v_NextSequence;" but got an error indicating that an
>expression can't be used with Return. I didn't compile this routine as an
>Oracle stored procedure because one of the requirements is that all SQL must
>be sent through VB/ADO this way.
>
>Please help. Many thanks in advance.
>Andrew.
>vanhao_at_yahoo.com
>
>
Received on Tue Oct 13 1998 - 09:56:29 CDT

Original text of this message

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