>>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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement