Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UDF in select statement: gives data type mismatch error
Message
From
10/04/2002 17:19:27
 
 
To
10/04/2002 16:01:16
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00643449
Message ID:
00643496
Views:
18
This message has been marked as the solution to the initial question of the thread.
Inge,
VFP's SQL parser evaluates calls to UDFs before running the actual query. It does this in order to know the data type and size of the return value. Could it be that your parameters are not initialized correctly? What are parm1 and parm2?

Could you post the code of the 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!
Daniel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform