Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unusual substitution syntax
Message
From
19/01/2004 03:48:17
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00867888
Message ID:
00868023
Views:
24
Hi Sergey,

>>>>>>>>>>>>>>
You cannot control those functions because you don't know know what aliases FoxPro will assign tables opened in SQL. Your second SELECT confirms that because RECNO('B') and RECNO('C') return 1 for all rows or other incorrect results depending on what tables are already open.

My example was hurried ( i have not many time ),
but the problem is that VFP tries to optimize the SELECT.

However, this would have to resolve the problem.
CLEAR
CREATE CURSOR ccc ( ff I DEFAULT RECNO())
APPEND BLANK
APPEND BLANK
APPEND BLANK
APPEND BLANK
APPEND BLANK
APPEND BLANK
APPEND BLANK
GO TOP

SELECT RECNO('B'),RECNO('C'),* FROM ccc B,ccc C WHERE myCall(B.ff,C.ff)

USE
USE IN ccc

FUNCTION MYCALL(xx,yy)
RETURN RECNO('B')=RECNO('C')+1
ENDFUNC
I repeat, it is possible to control these commands ( RECNO(),... ) on a SELECT.

Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform