Hi Sergey,
>What VFP version are you using?
VFP8 SP1
>The following code correctly returns 1 record in VFP9SP1.
>
>CREATE CURSOR Cursor1 (fld1 C(10) NULL, fld2 C(10) NULL)
>APPEND blank
>CREATE CURSOR Cursor2 (fld3 C(10) NULL, fld4 C(10) NULL)
>INSERT INTO Cursor2 VALUES (Null, Null)
>SELECT * FROM Cursor1, Cursor2 INTO CURSOR Cursor3>
Tried the above code, and I got the expected result of
RECCOUNT('Cursor3')=1. So this got me thinking... My Cursor2 had one record, but SELECT * FROM Cursor2 resulted in zero records. The purpose of Cursor2 was to create an empty cursor from a SQL table using SQLEXEC(lnHandle,[SELECT * FROM MyTable WHERE1=2],'Cursor2'), then I performed an APPEND BLANK in order to get a single record to join with Cursor1 to produce a single record in Cursor3. As soon as I fill any field in Cursor2 with some data, then perform the join, I get the expected result.
As your code above worked fine with APPEND BLANK, I suspect the problem lies with how Cursor2 was originally created using SQLEXEC. Is there something wrong with my thinking?
Regards,
Alan