AutoIncrement field

E

Erik Visser

Hi all,

I like to create a table with SQL with a autoincrement field. But the
autoinc value should not be in a range, but a random value.
With the table designer it is just about setting the property right, but how
can i do this with SQL?TIA<

Erik Visser
 
V

Vincent Johns

Chris2 said:
Erik,

I only searched for twenty minutes, but the available evidence
points to this not being possible in JET SQL. If that is true, you
will have to use DAO or the GUI.

Sincerely,

Chris O.

I looked, too, and didn't see it among the DAOs either. The closest I
came was finding the dbAutoIncrField value for the Attribute property of
a field in a Microsoft Jet database Table, with no apparent way to
specify either that it be incremental or random or anything else.
Microsoft appears to be making no guarantees about what it might do
(besides being unique, of course). But that's DAO 3.6, and later
versions might work differently.

Incidentally, when I add a random Autonumber field to a Table that
already contains records, the existing records get incremental values.
(I suppose they could actually BE random, and just happen to look like
1, 2, 3, 4, 5..., but if I were a gambler, I'd bet against that.)

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.
 
C

Chris2

Erik Visser said:
Hi all,

I like to create a table with SQL with a autoincrement field. But the
autoinc value should not be in a range, but a random value.
With the table designer it is just about setting the property right, but how
can i do this with SQL?TIA<

Erik Visser

Erik,

I only searched for twenty minutes, but the available evidence
points to this not being possible in JET SQL. If that is true, you
will have to use DAO or the GUI.


Sincerely,

Chris O.
 
E

Erik Visser

Chris, Vincent,
Thanks guys.
I think i 'll make the table available for replication, than it is
automaticly changed.

Erik
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top