Sorry for not telling the complete story:
The index command works as expected.
The mesage comes up when I do a VALIDATE DATABASE. I would like to prevent this message by adding the index definition to the DBC. But I do not know how.
>The INDEX command creates an index. Doesn't matter if it doesn't exist. You may be able to suppress a message with SET MESSAGE OFF
>
>
>>Thank you for your lightning fast response!
>>
>>I tried your suggestion but the index is not in the the DBC. Insted I get an error message saying the the index definition for the indexname EMAIL in the CDX could not be found in the database. I can add it as on option in the error message. But I would like to prevent this message as I try to do an update routine for customers with an older version of my app.
>>
>>Any other idea?
>>
>>TIA
>>Gerhard
>>
>>>FOREIGN key means it references another table.
>>>
>>>Try INDEX ON UPPER(Email) TAG EMail
>>>
>>>
>>>
>>>
>>>>Hello,
>>>>
>>>>I want to add an index defintion to a DBC programatically. The index is not a primary key, not a cadidate key and not a foreign key. It has no reference to another table.
>>>>
>>>>I tried
>>>>
>>>> ALTER TABLE (lcDataPfad + "DPERS.DBF") ADD FOREIGN KEY UPPER(EMAIL) TAG EMAIL
>>>>
>>>>But that gives an syntax error for the REFERENCE clause is missing.
>>>>
>>>>How do I add the index definition to the database?
>>>>
>>>>TIA
>>>>Gerhard
Gerhard Schmidbauer
URANUS Software GmbH