Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Select MS Bug
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SQL Select MS Bug
Miscellaneous
Thread ID:
00361940
Message ID:
00361940
Views:
50
Is this me or an MS bug The following program should return a cursor with 1,1 and 2,2 as the first and second record, it returns 1,2 and 2,3

The function GetRec() is executed 3 times !!!??? and should be executed only twice as th tmp table has only two records.

Anyone ever experienced this before ?

Thanks.



**- TestSql.Prg
CREATE Cursor Tmp ( nRec N(1) )
INSERT INTO Tmp (nRec) Values (1)
INSERT INTO Tmp (nRec) Values (2)

Copy To Tmp.Dbf
USE

lnCount = 0

SELECT nRec, GetRec() AS nRecno From Tmp.dbf INTO Cursor TestBug
Browse

FUNCTION GetRec
lnCount = lnCount + 1
RETURN lnCount
ENDFUNC
Next
Reply
Map
View

Click here to load this message in the networking platform