How to generate unique key field values in FoxPro and in Visual FoxPro (106708)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft FoxPro for MS-DOS 2.0
- Microsoft FoxPro for Macintosh 2.6a
- Microsoft Visual FoxPro for Windows 7.0
- Microsoft Visual FoxPro 8.0
- Microsoft Visual FoxPro 9.0 Professional Edition
This article was previously published under Q106708 SUMMARY
You can use the following methods to generate a unique string for a key field value: - If you are using Microsoft Visual FoxPro 8.0 and later versions, you can create an autoincrement field type.
- You can create a unique value by using Microsoft Windows API functions.
- If you are using earlier versions of FoxPro and of Visual FoxPro, another method is described later.
For additional information, see the "References" section. REFERENCESFoxPro 2.5 Advanced Developer's Handbook, Pat Adams and Jordan Powell,
Brady Publishing, New York, NY, 1993, Chapter 18, page 644
For additional information about creating a unique GUID, click the following article number to view the article in the Microsoft Knowledge Base:
269387
How to obtain a GUID in Visual FoxPro
For additional information about the autoincrement file type, search for "autoincrement fields" in the Visual FoxPro online Help.
Modification Type: | Major | Last Reviewed: | 3/10/2005 |
---|
Keywords: | kbcode KB106708 |
---|
|