Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with seek on a view
Message
From
21/08/2000 14:50:05
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00407408
Message ID:
00407464
Views:
26
Nice tip, Roi. That just became standard for my code. Thanks. BTW, this view's code is:

SELECT Customers.company, Transactn.*;
FROM tomparco!customers RIGHT OUTER JOIN tomparco!transactn ;
ON Customers.cust_id = Transactn.cust_id;
WHERE DELETED() <> .T.;
ORDER BY Transactn.trans_id

Judging from this you can probably guess that there are more records in the Transactn table than in this view (Transactn may have deleted records). An append blank to this view doesn't append blank to it's underlying table, so whatever record the table is sitting on ..... you get the idea - a mess.

Why doesn't it append blank in the underlying table? Not the same # of records?


>Hi Jimmy,
>
>I see Mike and Erik found your problem. I just wanted to mention WITH...ENDWITH, you can use it to save yourself some typing AWA speed you code up a little. See below:
>
>
>Transactn_search():
>SELECT trancustin
>
>GO TOP
>
><b>With ThisForm</b>
>    .trans_num = .Combo1.displayvalue
>
>    SEEK .Combo1.displayvalue ORDER TAG trans_id IN trancustin
>
>    IF FOUND()
>        .Combo1.value = trans_id
>	.Text1.VALUE = track_num
>	.Text2.VALUE = company
>	.Text3.VALUE = lot_worth
>	.Text4.VALUE = amt_initial_owed
>	.Text5.VALUE = amt_owed
>	.Text6.VALUE = trans_date
>	.Edit1.VALUE = transdesc
>	.trans_num = .Combo1.displayvalue
>    ELSE
>        = messagebox('The record you searched for is invalid and should be deleted')	
>    ENDIF
>
>    .cursor_trans_items()
>    .browse_gridcontrols()
><b>ENDWITH</b>
Previous
Reply
Map
View

Click here to load this message in the networking platform