Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Array passing in SQL UDF
Message
 
 
À
08/01/2000 14:47:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00314970
Message ID:
00315120
Vues:
30
Hi Kenneth,

>I've fixed this problem by using a parameter object but would like to see if someone can explain why this happens.
>
>I have a UDF:
>
>
>FunctionX
>
>Parameter pArray
>
>For nCnt=1 to aLen(pArray,1)
>   Seek(pArray[nCnt,1],"ATABLE")
>EndFOr
>
>Return
>
>
>This work:
>
>FX="FunctionX(@myarray)"
>&FX
>
>This causes an error:
>
>FX="FunctionX(@myarray)"
>Select * From SomeTable Where &FX to cursor SomeCursor
>
>The error come from the UDF saying that pArray.prg is not found.
>
>Any ideas?

What should FunctionX return and what should it do? Move the pointer on the specific record? How is it related with your SQL.

Anyway, if it returns logical expression, you can simplify your life this way:

llRetValue=FunctionX(@myarray)

SELECT * From SomeTable Where llRetValue to cursor SomeCursor

Does it work?
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform