Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any way to detect if field is set for autoincrement
Message
From
23/05/2007 08:48:22
 
 
To
23/05/2007 08:23:57
Bill Drew
Independent Consultant
Chicago, Illinois, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01227864
Message ID:
01227875
Views:
16
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform