ID: Q117568
2.60 | 2.60
WINDOWS | MS-DOS
kbprg kbbuglist
The information in this article applies to:
The KEYMATCH() function returns different results, depending on the order of the commands issued.
Microsoft has confirmed this to be a problem in FoxPro 2.6 for Windows and FoxPro 2.6 for MS-DOS. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
1. Load FoxPro.
2. Copy the following code into a program:
CLEAR ALL
CLEAR
CREATE TABLE people (pID C(5), pNAME C(10), pCITY C(10))
APPEND BLANK
REPLACE pID WITH 'A1234'
REPLACE pNAME WITH 'Mickey'
REPLACE pCITY WITH 'Bellevue'
INDEX ON pID TAG id
INDEX ON pNAME TAG name
? KEYMATCH('A1234','PEOPLE') && Invalid function argument...
? KEYMATCH('A1234','PEOPLE',1) && .T.
? KEYMATCH('A1234','PEOPLE',2) && .F.
? KEYMATCH('A1234','PEOPLE') && .F. instead of "Invalid..."
? KEYMATCH('Mickey','PEOPLE',2) && .T.
? KEYMATCH('A1234','PEOPLE') && .F. instead of "Invalid..."
3. Run the program.
When the "Invalid function argument, type, or count" error message occurs on the first ? KEYMATCH('A1234','PEOPLE') command, choose the Ignore button.
Note that the second and third issuances of the same command return a .F. (FALSE) value instead of the "Invalid function argument, type, or count" error message.
If you put the KEYMATCH() commands in the following order
? KEYMATCH('A1234','PEOPLE') && Invalid function argument....
? KEYMATCH('A1234','PEOPLE',2) && .F.
? KEYMATCH('A1234','PEOPLE',1) && .T.
? KEYMATCH('A1234','PEOPLE') && .T. instead of "Invalid..."
? KEYMATCH('Mickey','PEOPLE',2) && .T.
? KEYMATCH('A1234','PEOPLE') && .F. instead of "Invalid..."
the first ? KEYMATCH('A1234','PEOPLE') command returns the "Invalid
function argument, type, or count" error message, the second issuance of
the same command returns .T. (TRUE), and the third issuance of the same
command returns .F. (FALSE).
Additional reference words: FoxDos FoxWin 2.60 errmsg err msg buglist2.60 KBCategory: kbprg kbbuglist KBSubcategory: FxprgGeneral
Keywords : FxprgGeneral kbbuglist
Version : 2.60 | 2.60
Platform : MS-DOS WINDOWS
Last Reviewed: February 18, 1996