Hi -
I am creating a new application and setting up my GetKey program to auto-generate primary keys for my tables, and for some reason, I am getting a message when I append a new record that says>
Index tag not found
My program is as follows:
FUNCTION GetKey
PARAMETER lnKeyNum
IF NOT USED("keylist")
USE keylist IN 0
ENDIF
IF SEEK(ALLTRIM(lcKeyName),"keylist",keyname")
REPLACE keynum WITH keynum+1 IN "keylist"
lnKeyNum = keylist.keynum
ELSE
INSERT INTO KEYLIST(KEYNAME,KEYNUM)VALUES(lcKeyName,0)
lnKeyNum=0
ENDIF
USE IN keylist
RETURN lnKeyNum
*************
My "keylist" table (that is the exact name of the table) is set up as follows:
Tablename: keylist
field: ckeyname (datatype is character and it has a regular index)
field: nkeynum (datatype is numberic and it has a regular index)
Which fields should be indexed?
When I go to BROWSE, I place the name of the table in the KeyName field and the number 0 in the keynum field.
In all my tables, in the default text box, I have the phrase:
GetKey("tablename")
____________
Why am I getting a message that says INDEX TAG IS NOT FOUND when I attempt to append a record?
Thanks in advance for any help
jason
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only