Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HELP! Can't Update the source table with a view
Message
From
06/01/1999 22:43:25
Paul De Niverville
Deniverville Econometric Research Ltd.
Victoria, British Columbia, Canada
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00172712
Message ID:
00173401
Views:
30
Hi, John,

What I did was to delete the view and add a two views, one that I wanted to update, the other I only wanted to display some information. It seems that VFP wants to insert to all tables in a view. Using two views got me around the problem. I'm using an updated Codebook framework.

Another option that I tried was to create a view in MS SQL Server of the tables in MS SQL Server. That worked fine, except I couldn't update fields defined as memo in VFP. So the two view approach in VFP works fine.


Paul

>I've also had similar "cannot insert an empty..." problems with a view that was marked updateable and PK was set. It drove me crazy for few days and I couldn't figure out why it would not work. Strangely though, it started working after few days but I couldn't figure out what I did differently (if anything). I think there's something screwy with VFP6 handling of certain views in certain conditions.
>
>Try deleting the view and recreating it from scratch and even renaming it when you do.
>
>>Hi Jack,
>>
>>I had a similar problem with a view of two tables but I only wanted to update one of them. I was getting the error message "cannot insert an empty row from a view into its base table". Are you getting this message?
>>
>>Paul
>>
>>>Hi Edward, Thank you.
>>>Yes, I mean that I've checked the 'Send SQL updates'(I use Chinese version VFP 5) checkbox. and the view is a local view, It join two tables but I just want to update only one of them.
>>>Thanks again.
Previous
Reply
Map
View

Click here to load this message in the networking platform