Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL return empty record
Message
From
09/02/2004 11:54:17
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
09/02/2004 08:35:17
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00875407
Message ID:
00875500
Views:
21
Hi John

The VFP help cautions against using UDFs in SQL. Please explain what you are trying to do, so we can suggest alternatives.

>Hi,
>I have a SQL statement that call my UDF. In the UDF, I have code to LOCATE the result as following.
>
>
>SELECT * FROM mytable WHERE myUDF() INTO CURSOR myresult
>
>FUNCTION myUDF()
>    *-- Some codes...
>
>    IF myCondition
>      lnWrk = SELECT(0)
>      SELECT myresult
>      LOCATE FOR condition1
>      IF FOUND()
>        *-- Som something
>      ENDIF
>
>      SELECT (lnWrk)
>    ENDIF
>
>    RETURN .T.
>ENDFUNC
>
>
>
>VFP returns empty record in result cursor for those records which match mtCondition.
>
>Any ideas?
>
>Thank you
Previous
Reply
Map
View

Click here to load this message in the networking platform