Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Any way to detect if field is set for autoincrement
Message
De
23/05/2007 08:48:22
 
 
À
23/05/2007 08:23:57
Bill Drew
Independent Consultant
Chicago, Illinois, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01227864
Message ID:
01227875
Vues:
12
>I spent too much time chasing down some data corruption that was caused by a primary key field that had been changed from autoincrement to standard integer. Is there a cursorgetprop or other way to detect when a field is not autoincrementing on append/insert? A custom function?
>Thanks

Another way:
try 
  Cursorsetprop("autoincerror",.T.)
  Replace field with field
catch
  * error 2088: Field is read-only due to autoinc
  * error 111: cursor is read-only
endtry
Bye, Olaf.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform