Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Oracle sequence and ASP question.
SAL
Try having a stored procedure created in Oracle to get new/current
sequence number. Call that from ASP.
Didn't say what version of Oracle
This will work in 7/8
Have a stored procedure created to handle inserts into table have it return
the unique_id just inserted.
In O8 the RETURNING clause of an Insert will return unique_id just inserted. If you do your own SQL. Check SQL reference on SEQUENCE objects for use. eg. Select ps_sequence.nextval into your_variable from dual; Currval shows the current process/user latest sequence and is established after a nextval call.
hth
Dave Fowler
Oracle developer/dba
"SALvation" <dans87_at_hotmail.com> wrote in message
news:cdc00fd8.0107200529.5c9045e6_at_posting.google.com...
> I am used to working with SQL Server and they have nice neat identity
> columns. Well now I am working with Oracle and it has been this huge
> project to get a damn sequence number. Our DBA made a field called
> Unique_ID in my normal table "ps_table" and created a sequence called
> "ps_sequence". My question is how do I insert and pull values from
> this sequence in ASP? I tried asking some other people I work with but
> I would have gotten a better answer if I asked my dog.
>
> Please help!
>
> THX.
>
Received on Sat Jul 21 2001 - 10:11:47 CDT
![]() |
![]() |