Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
An FPDos bug ?
Message
From
28/06/1999 00:42:32
 
 
To
28/06/1999 00:13:05
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Title:
Miscellaneous
Thread ID:
00234624
Message ID:
00234625
Views:
21
Hi Alex

You may have gone through to the other side!

Personally, I avoid UDF's in SQL SELECTS, these can produce unexpected results (especially if you are trying to referance an database alias!) UDF's in the SQL can also add to your processing time.

In the example the you give, why would you need to use TRIM(), the fields returned in the cursor are all fixed length? If you are trying to format fields, return the individual fields, then format them after the select is completed as an extra step. Then TRIM and everything else works great.

>Hi,
>
>While using FP DOS I call a UDF from a SQL SELECT. I was surprised to find out that TRIM() does not work seem to work within the function! The code is this:
>
>SELECT FormatData(cX) AS cX FROM xx INTO CURSOR Y
>
>FUNCTION FormatData
>PARAMETER tcData
>lcNewData = ...
>RETURN lcNewData
>
>
>After getting funny results I paused within the function and
>tested through the DEBUG window that TRIM("aa ")+"." is not
>"aa." Does anybody know why? Have I gone through the looking glass?
>
>TIA,
>
>Alex
____________________________________________

Norm Peterson

It's a dog eat dog world out there,
and I'm wear'n milk bone underware!
Previous
Reply
Map
View

Click here to load this message in the networking platform