Link to home
Start Free TrialLog in
Avatar of aarontham
aarontham

asked on

Foxpro database Auto ID field

Hi,

I use vb6 and foxpro database, Pls advice how to do an auto id field.
Avatar of jkwasson
jkwasson

Later releases of Visual FoxPro, starting with VFP8 and now VFP9, have added the ability to use AuoIncrementing fields built right into the tables as a newer type of integer field.

Integer (Autoinc) field type
Integer Field Type
http://msdn.microsoft.com/library/en-us/dv_foxhelp9/html/e2e6eeaf-b170-4a8c-b826-c5127938d8d6.asp?frame=true

How to: Set Autoincrementing Field Values
http://msdn.microsoft.com/library/en-us/dv_foxhelp9/html/d4fd7029-4f84-45ee-b0de-75eb1dc45bd3.asp?frame=true

In previous versions, Fox developers had to roll their own autoincrementing capabilities for their FoxPro tables/.dbfs, if they wanted to go that way.  Here is one example article on how to do that in earlier versions:

An Autoincrementing Class
http://www.lespinter.com/PC/ShowArticle.aspx?ArtNum=221
ASKER CERTIFIED SOLUTION
Avatar of CarlWarner
CarlWarner
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Glad I could help.