Message
From
20/09/2006 19:09:19
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01155542
Message ID:
01155783
Views:
35
Hi Sergey,

After some experiments, I observed that the original SQL command does not select the correct records. When I modified the SQL command it works fine (every time). Please see the modified code in cboCustomer.Valid().
Thisform.lstOrders.RowSource = ''

* This command works 
*!*	SELECT order_id,order_date, order_amt, shipped_on FROM orders ;
*!*		INNER JOIN customer ON orders.cust_ID = customer.cust_ID ;
*!*	    WHERE orders.cust_id = This.value ;
*!*	    INTO CURSOR curSelectedOrders ;
*!*	    ORDER BY order_id    

* This command gives error .......   
SELECT order_id,order_date, order_amt, shipped_on FROM orders ;
    WHERE orders.cust_id = This.value ;
    INTO CURSOR curSelectedOrders ;
    ORDER BY order_id    
        
Thisform.lstOrders.RowSource = 'curSelectedOrders'
Thisform.lstOrders.ReQuery()
I would like to add that customer and orders table are used from Samples\Data\TestData.dbc that come with Visual FoxPro 9.
- Ravi Taxali
Visual FoxPro Made Simple An excellent book for beginners as well as experienced programmers
Never Forget Again. Setup Email Reminders.
Previous
Next
Reply
Map
View