Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
View update issue
Message
 
To
17/11/2011 11:59:04
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01529078
Message ID:
01529163
Views:
37
>>Hello Everyone:
>>
>>I have a strange issue with a view created below
>>
>>
>>CREATE SQL view vMacSet as;
>>SELECT Mac_set.project,;
>>		Mac_set.pk_macflds,;
>>		Mac_set.SetValue,;
>>  		Mac_flds.SetName;
>>  	FROM mac_set ;
>>		JOIN mac_flds ON Mac_flds.pk_macflds = Mac_set.pk_macflds;
>> 	WHERE ( project ) = ( ?nStartProj );
>> ORDER BY Mac_flds.setname
>>
>>
>>The view is made up of two tables. All fields are updatable execpt the field "SetName" from the second table. My problem is that GETFLDSTATE(-1) does not return the proper setting if changes are made to the view. Same holds true for deleting records. Any help would be appreciated.
>>
>>Thanks, Mike
>
>Hi Mike,
>
>I haven't used views in many years, but the general advice is to only have one table updateable from a view. In your case I would have two views (one for each table) and then update them both in a transaction.

Thanks Frank - Actually I got it to work but not in my normal way. Most of the views I have are created by another table that has the view definitions. This has worked well until this view which requires two tables. I basically had to "code" it in the area where views are created and it worked as expected. Thanks for your resonse.
Previous
Reply
Map
View

Click here to load this message in the networking platform