Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
List box does not refresh in VFP 9
Message
From
21/09/2006 01:15:24
 
 
To
20/09/2006 19:09:19
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01155542
Message ID:
01155817
Views:
22
>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.
start with lstOrders
RowSource = 'curSelectedOrders'
RowSourceType = 0

* combo.valid
Thisform.lstOrders.RowSourceType = 0

* 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

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.RowSourceType = 2
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform