Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
View update unreliable.
Message
From
08/07/1998 09:36:26
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
View update unreliable.
Miscellaneous
Thread ID:
00115246
Message ID:
00115246
Views:
45
Greetings.

I've created a view using the following code. The problem I'm having is sometimes the view wouldn't update the parent table even thought I use the following command =TableUpdate(0,.T.,"SelectedFiles") whenever I need to update the parent table.

Any help to solve this problem will greatly appreciated.


Thanks
Carl

Function CreateView
Parameter lcWhere, lcOrder

Set Safety Off
Create SQL View SelectedFiles As;
Select All *;
From "File Manager!Files";
&lcWhere;
&lcOrder
Set Safety On


*Set the View as updatable
*
*Match the view fields to thier parent table counterparts....only for those fields that's updatable
=DBSetProp("SelectedFiles.Type", "Field", "UpdateName", "Files.Type")
=DBSetProp("SelectedFiles.Reminder", "Field", "UpdateName", "Files.Reminder")
=DBSetProp("SelectedFiles.Notes", "Field", "UpdateName", "Files.Notes")
=DBSetProp("SelectedFiles.User", "Field", "UpdateName", "Files.User")

*Set which fields are updatable
=DBSetProp("SelectedFiles.Type", "Field", "Updatable", .T.)
=DBSetProp("SelectedFiles.Reminder", "Field", "Updatable", .T.)
=DBSetProp("SelectedFiles.Notes", "Field", "Updatable", .T.)
=DBSetProp("SelectedFiles.User", "Field", "Updatable", .T.)

*Set the keys that will be used to determine which record would be updated in the parent table
=DBSetProp("SelectedFiles.Dir", "Field", "KeyField", .T.)
=DBSetProp("SelectedFiles.FileName", "Field", "KeyField", .T.)

*Set the Update function on
=DBSetProp("SelectedFiles", "View", "SendUpdates", .T.)
Carl
Next
Reply
Map
View

Click here to load this message in the networking platform