Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP is leading me to madness !!!
Message
De
23/12/2004 03:47:54
 
 
À
22/12/2004 03:40:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00971290
Message ID:
00971701
Vues:
11
>I always and underline the word ALWAYS use the same techinique to make a search in a table and put the result in a textbox:
>
>From the textbox in the doubleclick event I call the form which make the search
>- do form SearchForm to lcRetval
> if !empty(lcRetval)
> this.value = lcRetval
> .......
>
>well yesterday i get the error DataType mismatch.
>i look at the line of code which gave me the error and LISTEN !!:
>=SEEK(THIS.VALUE,'MyTable','MyIdx')
>i check the value in this.value and it was a charachter type, checked the idx expression and it was a character type.
>
>Any Ideas ?
>Moreover, doing the same thing a second time it works ok and it carry on working fine .....
>Thank you
>Alessio

How do you set value of the that textbox (this.value) to be char?
Explicitly via property value or via controlsource ?
How about setting controlsource to some variable of a prefixed datatype
(char) and then using that variable for seek.
This way u r 100% sure what are you dealing with.

Somehow I always prefered having;

seek cSearchExp

instead of;

seek this.value

My 2c

Rgds++
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform