Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Auto increment READ ONLY
Message
From
18/01/2012 14:43:17
 
 
To
18/01/2012 12:52:46
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01533199
Message ID:
01533229
Views:
41
>>i am using auto increment to assign a number to a field automatically. However, every now and again, I need to change the number manually in the data. It's not allowing me to do so, says it's read only. I end up having to hit cancel and killing the application to get out of the routine.
>>
>>More details;
>>I have consecutively numbered membership cards.
>>Each record has a unique card number assigned to it.
>>If I create a new record, then revert changes back, it increments the count ahead, even though a new record was not created.
>>So I have a useless membership card, unless I can go back and manually input the correct member number, that has already been passed.
>
>
>SET AUTOINCERROR OFF
>
structuring the code with
ALTER TABLE TableName1 ADD | ALTER [COLUMN] FieldName1 
      FieldType [( nFieldWidth [, nPrecision])] [NULL | NOT NULL] [CHECK lExpression1 [ERROR cMessageText1]] 
   <b>[AUTOINC [NEXTVALUE NextValue [STEP StepValue]]]</b> [DEFAULT eExpression1] 
   [PRIMARY KEY | UNIQUE [COLLATE cCollateSequence]] 
   [REFERENCES TableName2 [TAG TagName1]] [NOCPTRANS] [NOVALIDATE]
is cleaner IMHO

funny - in preview bolding worked...
Previous
Reply
Map
View

Click here to load this message in the networking platform