Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FPD25 SELECT and UDF and Multiple DBFs
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00593262
Message ID:
00594362
Views:
35
You missed my point. You cannot reference already open tables used in SQL Select because SQL Select isn't using them.

>I was aware of parameter passing but I had too many parameters and only the calulated result was required. So I took it differently, removed the DBFs which were only for parameter purposes, passed the PK to the UDF, the UDF did regular SEEK() of the just disconnected DBFs now regular used files, calc the retval and best of both the worlds are here.
>
>Thanks for responding
>
>>>>>Dear All,
>>>>>
>>>>>I am writing a SELECT statement. I have to use multiple UDFs in it as there are a lot of complicated calcuations going on in it and the return value from the UDF is to be used as the value for the SELECT.
>>>>>
>>>>>1) Should I, WHERE join the required DBFs and in the UDF straight away use the current record in the respective DBFs for calculations?
>>>>

>>>>
>>>>I would try this first.
>>>
>>>No Go. The record pointer is not where it should be for the record being joined in the DBFs
>>>
>>
>>The SQL Select doesn't uses already open tables but works with there copies opened with equialent of USE AGAIN comand. That's why you cannot use table aliases in such function as RECNO(). The same applays to UDF, you have to pass all fields you need from tables involved in Selecxt as parameters to UDF.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform