>I'm using VFP 5.0, have a form with pages and grids, most of which are working fine ...with one exception (of course! ;)...). I've created a view with the following code to use as my grid's recordsource:
>
>CREATE SQL VIEW lvOthCon AS SELECT connect.acode, connect.network, connect.contype, ;
> lvcontype.dispval AS contypename, connect.speed, connect.vendor , connect.connid, ;
> lvvendor.dispval AS vendname ;
> FROM connect ;
> LEFT JOIN lvcontype ON connect.contype = lvcontype.codeno ;
> LEFT JOIN lvvendor ON connect.vendor = lvvendor.codeno ;
> WHERE connect.acode = ?caid
>
>I'm using 'mini-views' lvcontype and lvvendor which are just filtered lists of my master codes tables to get the display values for my main CONNECT.DBF's connectiontype and vendor codes.
>
>And I've used the DBSETPROP's to set the tables property, name the keyfield (connid), map the fields to the base table, set all fields as updatable, and the SendUpdates as T.
>
>The view's BufferModeOverride is the default 1 in my form's Data Environment. I have not included any tableupdate() command (not sure where or if needed).
>
>The grid has 4 columns, 2 text which work fine, 2 with comboboxes which show the display values from the 'mini-views' mentioned above. My problem is when I try to change the values in those comboboxes. All seems fine until I want to close the form. Then I'm getting an "Update Conflict" from my form's Destroy method "close tables all" command.
>
>The funny thing is though, I'll hit cancel at the error message, but the changes will still be reflected in my base tables so the changes are being passed from my grid view to my base table.
>
>I've got other similar views that work fine. I can't figure out why I'm having problems with this one. Any ideas??
>
>MTIA!!
>
>Mandy
You can simplify the arrangement of these views, because you don't need to join 'mini-views'. It's enough to base the view on just one master file, and use lookups as rowsources for combos. Each combo will have different Value and Displayvalue, i.e. value will be bound to master_foreign/lookup_primary key, and Displayvalue will show another rowsource field.
Edward Pikman
Independent Consultant