>>Hola Folks!
>>
>>Im using a SEEK() for validate an event, but its not working properly. The index is compossed by two numeric expressions:
>>
>> STR(field1) + STR(field2)
>>
>>on the table, with only one record:
>>
>> FIELD1 FIELD2
>> 1 11
>>
>>then, running the form, I look for STR(1)+STR(7) and VFP 5.0 says that he found it. Obviously the SET EXACT ON is on effect, and if I quit my application and do it by the command window, it work how it should!
>>
>>I imagine this is happening because a SET, but which?
>>
>>TIA & grettings from Cancun beaches
>
>Roberto,
>Yo pienso como David. la configuración del 'set exact' no debe estar cumpliendose en el formulario. Yo uso una sub-clase de formularios que en su evento init() llaman a una rutina que inicializa todos los 'set' adecuados.
>Ese seek debe funcionar correctamente. Yo lo uso habitualmente.
>Carlos.
When using two numeric values for a compound index it is typically better to separate the numbers with a delimiter, ie.
ALLT(STR(field1)) + "-" + ALLT(STR(field2))
Otherwise, your seeks will rarely get you the result you want. Note that the ALLTRIM() is used to reduce the size of the CDX file.
-David
Previous
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