Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Do not understand view behavior
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00753207
Message ID:
00755691
Views:
8
Giesbert
I decided to run gendbc after reading your response, to see what was actually being built.

I missed the update check for the primary field. It did not get checked when I selected all, it appears. Also the primary key for the 2nd table was checked, which was creating a conflict even though the update was not checked. You were right on about the properties as was Dorin. Thanks a lot for your suggestion. My table update now works.

How far is Laatzen from Bonn? I have a good friend, Michael Thelen, that lives there. I was out there the middle of October 2002 to visit him. It was beautiful, like New England in the States. I was in Frankfurt, Cologne and Fussion. I was able to visit 3 middle age castles and the DOM cathedral. The trip was too short but much fun.

>Chuck
>
>check if you have set the properties of your view right.
>This is most of the work with views to update tables in the way you want.
>You have to tell the view the keyfield it should take to update the source tables. By the way, you have to have a primary keyfield defined for each table you want to update with a view.
>I would recommend to create some setup programs for your views as it will require rerun everytime you change the base tables. The designer might not work for complex views, watch out Version 8.
>You can apply all rules for fields and tables too except triggers.
>Study DBGETPROP() in the help.
>try something like this.
>
>< PRE>
>SET DATABASE TO UNIVERSE
>
>CREATE SQL VIEW VWGENERATOR AS SELECT GENERATOR.*, GENERATORPOS.* FROM UNIVERSE!GENERATOR left JOIN UNIVERSE!GENERATORPOS ON GENERATOR.nobjektid = GENERATORPOS.nobjektid where GENERATOR.field="xyz"
>
>=DBSetProp("VWGENERATOR.NOBJEKTID_A","FIELD","KEYFIELD",.T.) && e.g. set keyfield only for GENERATOR table
>
>=DBSetProp("VWGENERATOR","VIEW","SENDUPDATES",.T.) &&make the view send updates
>
>&& set fields updatable
>&& watch the suffix _A if you have fields with the same name
>=DBSetProp("VWGENERATOR.NOBJEKTID_A","FIELD","UPDATABLE",.T.)
>=DBSetProp("VWGENERATOR.COBJEKT","FIELD","UPDATABLE",.T.)
>=DBSetProp("VWGENERATOR.FIELD","FIELD","UPDATABLE",.T.)
>< /PRE>
>
>Giesbert
Extreme Programming = Plan -> Design -> Code -> Test
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform