Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SCAN and query result
Message
From
03/08/2001 11:44:20
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00537855
Message ID:
00539436
Views:
16
>One thing you absolutely do not want to do is add a UDF to a SQL query. VFP will run the UDF with every row of the source cursor, which KILLS performance.

I tried a UDF that deleted records. I thought that placing the UDF after another condition (with AND) would make it run only if the other conditions returned .T. Wrong!

Fortunately, I didn't try this with production data.

What I finally ended up doing is use the subquery approach to get me the PK of each record, and then send the PK to my UDF.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform