Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update properties from view keep getting unset
Message
From
30/10/2000 18:18:53
Bill Drew
Independent Consultant
Chicago, Illinois, United States
 
 
To
28/10/2000 20:30:26
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00435622
Message ID:
00436148
Views:
15
>>I have a project that requires a one to many relationship on a relatively large sscale. There are about 1/4 million "many" records and about half that many "one" records. I thought it would be good to use a local view with that relationship and all of the fields (including the keys) specified for update, for "send updates" to be checked. I think I need the keys specified because I will have to add records. In my load event I open the view with the nodata setting. Then when the user fills in one of the search fields, I create the view again with an SQL clause which is constructed from the value in the search field.
>
>Be aware that recreating the view like this deletes and recreates many records in the dbc, and can eventually lead to dbc bloat. As long as you are planning for the periodic maintenance that this strategy requires (PACK), you'll be alright.
>
>>I also respecify with dbsetprop the tables in the view, the key fields in the view, and that it should send updates. However in my testing, I can't seem to get the updates to persist even though I use "if tableupdate". Then when I go back to the view designer all of the update properties have been set to nothing. Any ideas?
>
>Not sure what's going on here, but try opening the view with EView after you have modified it to see what changes have stuck. You can also use EView to automatically generate the code required to successfully recreate the view with all its properties.

Based on the problem I had with the view designer and doing the update as well as your points about the need to pack the dbc. I changed the strategy.

Now I am constructing the result set for edit using a cursor, changing the cursor into an editable cursor with the "Use again" technique that is featured in the UT FAQs, and then with click event of the "save" button, I'm running tableupdate. If it fails I'm detecting any differences with the values in the source tables using getfldstate, oldval, and curval. And then asking the user to confirm or abort overwrites of changes that happened since the original query.

Is this everything that the updateable views with a local data source does? Is it the right sequence for multi-user, client server with local tables? Am I missing anything by abandoning the view designer? I feel like I have more control this way.
Previous
Reply
Map
View

Click here to load this message in the networking platform