Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Updateable View problem
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00591980
Message ID:
00592606
Views:
18
Thank Evan, I had pretty much come to the conclusion that I would have to use a couple of views but it's always reassuring when someone confirms your thoughts.

>Hi Caroline,
>
>Adding/updating rows through a view which links multiple tables is problematic at best. It's not something I'd recommend as a normal practice.
>
>Your better plan, in this instance, might be to have two additional parameterized updateable views on the Contact and Address tables that you:
>a) if desired, Requery() as necessary to populate an existing row based on the address ID;
>b) add a row or update the existing row;
>c) TABLEUPDATE() the view to store the changes.
>
>There are other (some would say better/more efficient) ways to do this, but this is a relatively simple "quick fix" that should get you past the problem.
>
>HTH.
>
>>Hi all,
>>
>>I have 2 tables Contact and Address that are in an updateable view called ContactAddresses (linked using a key field on Address ID).
>>
>>My problem it that I want to add a new entry to the view but this entry may be using a new address or an existing address. This all worked fine until I tried to add with an Existing Address where upon I get the error 1502 - Visual FoxPro could not write to the selected record because it is in use.
>>
>>Is there any way to over come this?
>>
>>Thanks in anticipation.
Caroline
Previous
Reply
Map
View

Click here to load this message in the networking platform