Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to turn autoincrement off briefly in free table
Message
 
To
28/09/2005 17:38:02
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8
Miscellaneous
Thread ID:
01054246
Message ID:
01054251
Views:
22
>Two free tables have similar but not identical structure, with one field that autoincrements present in both. One table is empty and needs to receive data from the other table bit retain old value of field that autoincrements.
>
>What is the simplest way to turn autoincrement off momentarily and then back on?
>
>Thank you.
>
>Alex
alter table (lcTable) alter column (your autoinc field) I && removes autoinc

later on

alter table (lcTable) alter column (your autoinc field) I autoinc && adds autoinc
You can also include NextValue (lnNewValue) and STEP (lnNewStep) when turning on the autoinc, something like,: I autoinc nextvalue (lnNewValue) step (lnNewStep)


(You must have the table opened in excluive mode)
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform