Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
An FPDos bug ?
Message
De
28/06/1999 00:42:32
 
 
À
28/06/1999 00:13:05
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Titre:
Divers
Thread ID:
00234624
Message ID:
00234625
Vues:
22
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!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform