Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Auto-Inc field = 0
Message
From
13/09/2022 07:07:29
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
13/09/2022 06:50:29
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01684957
Message ID:
01684959
Views:
40
>Hello all,
>
>I never saw something like that ever. Through my application I added a record to an empty table that contains a field that is Auto-Inc. The value of that field on that new record is 0.
>
>How can that be?
>
>I tried to reproduce but couldn't.

Simple. Wrongly used ALTER TABLE / CREATE TABLE
CREATE TABLE bla (i1 I AUTOINC NEXTVALUE 0)
APPEND
this is better for new record / table
CREATE TABLE bla (i1 I AUTOINC)
APPEND
or
CREATE TABLE bla (i1 I)
ALTER TABLE bla alter COLUMN i1 I AUTOINC NEXTVALUE 0
APPEND
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Reply
Map
View

Click here to load this message in the networking platform