Connecting Tech Pros Worldwide Forums | Help | Site Map

sequence for access db

Eitan M
Guest
 
Posts: n/a
#1: May 23 '06
Hello,
How can I make sequence for access db ?
(the same like Oracle sequence).

Thanks :)



DFS
Guest
 
Posts: n/a
#2: May 23 '06

re: sequence for access db


Eitan M wrote:[color=blue]
> Hello,
> How can I make sequence for access db ?
> (the same like Oracle sequence).
>
> Thanks :)[/color]

You can approximate a sequence by creating a replica of the Oracle system
table PUBLIC_USER_SEQUENCE, and writing a function to use the values in it.

You could also make a simpler version by creating a single-column table with
an AutoNumber column in it.



Eitan M
Guest
 
Posts: n/a
#3: May 24 '06

re: sequence for access db


What version of MDB ?
What version of Oracle.
I have 2002 version, and Oracle 9i.

I have looked for the table (in Oracle, which I have previliage to see also
the user_tab_columns, but didn't find PUBLIC_USER_SEQUENCE table).

I have found somewhere in the past code,
that has a table for that, and stored procedure for that.

Can you lead me to some code + sample, please.

Thanks :)


DFS
Guest
 
Posts: n/a
#4: May 24 '06

re: sequence for access db


Eitan M wrote:[color=blue]
> What version of MDB ?
> What version of Oracle.
> I have 2002 version, and Oracle 9i.
>
> I have looked for the table (in Oracle, which I have previliage to
> see also the user_tab_columns, but didn't find PUBLIC_USER_SEQUENCE
> table).
>
> I have found somewhere in the past code,
> that has a table for that, and stored procedure for that.
>
> Can you lead me to some code + sample, please.
>
> Thanks :)[/color]


I don't have any sample code, but why don't you explain what you want to do
with a SEQUENCE and it may turn out you don't need one as "sophisticated" as
what's found in Oracle.

If all you need is a master sequential ID number, there are several options:

1) create a table with an AutoNumber field, and a Date field, and insert a
new record then get the Max() value
2) create a table with one Number field, and get that value then increment
it (or increment it then get that value)



Closed Thread


Similar Microsoft Access / VBA bytes