By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,456 Members | 1,270 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,456 IT Pros & Developers. It's quick & easy.

sequence for access db

P: n/a
Hello,
How can I make sequence for access db ?
(the same like Oracle sequence).

Thanks :)
May 23 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
DFS
Eitan M wrote:
Hello,
How can I make sequence for access db ?
(the same like Oracle sequence).

Thanks :)


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.

May 23 '06 #2

P: n/a
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 :)
May 24 '06 #3

P: n/a
DFS
Eitan M wrote:
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 :)

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)

May 24 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.