Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UDF function in SQL
Message
 
 
To
12/09/2004 16:30:39
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00941478
Message ID:
00941485
Views:
9
This message has been marked as a message which has helped to the initial question of the thread.
>>What error do you get? VFP calls UDF one extra time at the beginning to determine field size. It may use either the first record in the table or empty record. You shoud account for that in UDF code.
>
>Ok, if it calls the function at first to check field size, then, the initialization is needed as no parameter would be passed from our selected records.

Yes, it may be record outside of WHERE conditions or empty record. Mskb #133001 PRB: SQL SELECT Statement UDF Executes Twice On First Record provides some details.
I'm not sure how initializing variable may fix this problem, though. I would rather check for invalid parameters.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform