Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Auto Key Program
Message
From
02/03/1999 21:49:34
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Auto Key Program
Miscellaneous
Thread ID:
00193407
Message ID:
00193407
Views:
41
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
Map
View

Click here to load this message in the networking platform