Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cartesian join produces 0 records
Message
 
 
To
31/01/2006 19:25:29
Alan Harris-Reid
Baseline Data Services
Devon, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01091514
Message ID:
01092145
Views:
23
>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?

Alan,

The cursor created with SQLEXEC() is set to the optimistic record buffering. You have to issue TABLEUPDATE() after addding a record.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform