Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
UDF in select statement: gives data type mismatch error
Message
 
 
À
10/04/2002 16:01:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00643449
Message ID:
00643530
Vues:
6
This message has been marked as a message which has helped to the initial question of the thread.
As explained in mskb #Q133001, VFP uses the first record of the table to create and size output columns regardless of SELECT WHERE clause. You've to account for that extra call when you create an UDF.

>I have a UDF called myUDF, which returns a numeric data type.
>
>?myUDF(parm1,parm2)
>correctly returns a numeric data.
>
>SELECT myUDF(parm1,parm2) FROM myTable
>gives me a 'Data Type Mismatch' error.
>
>I've stepped through the UDF & all is fine until I hit the last statement:
>RETURN xRet
>(where xRet is the return value).
>
>Anybody knows what's wrong?
>Thanks all!
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform