Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Auto increment READ ONLY
Message
De
18/01/2012 14:43:17
 
 
À
18/01/2012 12:52:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01533199
Message ID:
01533229
Vues:
40
>>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...
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform