General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only