Thanks Mike,
That is a thorough implementation of what I was talkink about with full error checking. Looks great.
>Hi Burt
>
>Check out this thread...
>
>
http://vmpdiscussion.visionds.com/ShowMsg.wwt?MsgId=1A80P53R6>
>>You could also use the DTOS() function, which does the same thing as DTOC(,1), but is more readable. This will make your program logic easier to follow in the future.
>>
>>DTOC stands for Date TO Character
>>DTOS stands for Date TO String.
>>
>>DTOC(,1) gives the same functionality as DTOC(,1), but you need to remember what the ',1' parameter does for you.
>>
>>Thus the result I would recommend would be
ssnumber + DTOS(orderdate)
>>
>>>To create a compound index key, you've to convert all fields to the character type.
ssnumber + DTOC(orderdate,1)
Notice the second parameter used in DTOC(,1) function. It converts a date to the text format suitable for an index key.
>>>
>>>
>>>>I am trying to set a primary key for a character field and a date field through an expression. I have thhe following:
>>>>
>>>>ssnumber+orderdate
>>>>
>>>>ssnumber is a character field and the orderdate is a date field. When I try and save it I get the following:
>>>>
>>>>Operator/operand type mismatch
>>>>