Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
View update issue
Message
From
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:
01529137
Views:
44
>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.
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform