Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Tom,
Either thisform.text1.value or casema.caseid is not of character type.
Although not pretty, the simplest fix would to use transform. For example...
>***************************************************************************************
>local superid, act
>act = 'search'
>superid = 'IW/NP/MR 2002/7 '
>
>if act = 'search'
> locate for alltrim(TRANSFORM(thisform.text1.value)) = alltrim(superid)
>endif
>
>
>if act = 'search'
> locate for alltrim(TRANSFORM(casema.caseid)) = alltrim(superid)
>endif
>***************************************************************************************
>Hi All,
> Something really silly, probably have to do with type casting( which I dont know how to do in foxpro). I have put the follwing code in my init script of a form, but when it executes this script, it errors me on 9, which is datafield miss match, I cannot string it or type cast it... Can someone help me out?
>
>***************************************************************************************
>local superid, act
>act = 'search'
>superid = 'IW/NP/MR 2002/7 '
>
>if act = 'search'
> locate for alltrim(thisform.text1.value) = alltrim(superid)
>endif
>
>
>if act = 'search'
> locate for alltrim(casema.caseid) = alltrim(superid)
>endif
>***************************************************************************************
>
>Thx
>
>Tom
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