Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sql problems
Message
From
28/09/1998 22:01:17
 
 
To
28/09/1998 20:43:27
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00141499
Message ID:
00141734
Views:
32
Hiya Chris --

Yes it can! Look at the DBSETPROP command where you can set all update and other properties. If you like, run GENDBC on your database and look at the resulting PRG....you can always Cut and Paste from that to create a code snippet to tack on to your code creating the view to modify the update properties of the view.


>If we cannot use the view designer to change this view, then how does one set the update criteria? The user needs write access to two of the fields in the view. Can update criteria be set from code?
>
>Thanks for your help.
>
>--Chris
>
>>Chris ---
>>
>>View Designer chokes on multiple JOINs. Try the following:
>>
>>CREATE VIEW myview AS ;
>>   SELECT orders.*,orditem.*,porditem.*,invitem.* FROM orders ;
>>      LEFT JOIN orditem ON order_id+ord_line_no/100 ;
>>      LEFT JOIN porditem ON porder_id+pord_line_no/100 ;
>>      LEFT JOIN invitem ON invoice_id+inv_line_+no/100
>>
>>You cannot modify this view in the View Designer, either. If you have to recreate it, do it in code. Good luck!
>>
>>
>>
>>
>>
>>>I am trying to create a local view and having problems. VFP sometimes can create the view but later when I try to look at the resulting view (through MODIFY VIEW) I get unintelligible error messages. The tables involved are straightforward: order, order lines (orditem), purchase order lines (porditem), and invoice lines (invitem). The relationship is 1:M:M:M; i.e., one order can have multiple lines, one order line can relate to multiple purchase order lines, and one p/o line can relate to multiple invoice lines. The key fields in the tables are:
>>>
>>>order: order_id
>>>orditem: order_id + ord_line_no/100
>>>porditem: porder_id + pord_line_no/100
>>>invitem: invoice_id + inv_line_no/100
>>>
>>>Assuming all fields of all tables are desired in the view, how should the code be written? For example,
>>>
>>>create sql view test as;
>>> select * from order inner join orditem;
>>> on order.order_id = orditem.order_id;
>>> ...
>>>
>>>How to finish this code?
>>>
>>>Thanks in advance.
>>>
>>>--Chris Lawrence
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Reply
Map
View

Click here to load this message in the networking platform