Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
View not updating
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
View not updating
Divers
Thread ID:
00310882
Message ID:
00310882
Vues:
55
I have a curious question. I am creating a view based off of four tables, only one of which I would actually like to update. The other three simply provide some fields that are displayed for the user. However, when I create the view in a program file rather than the view designer, the fields used to link the primary table to the three lookup tables cannot be updated. The solution is to go into the view designer and set the Update Table property to the name of the primary table. I have tried doing this using DBSETPROP('ViewName', 'VIEW', 'Tables', 'mydb!mytable') but it doesn't seem to have any effect. I have included the code I use to create the table. If anyone has any suggestions, please let me know.


Thanks,
Justin Spies




VFP Code:
CREATE SQL VIEW lv_Requests AS ;
SELECT Requests.RequestID, ;
Requests.Action, ;
Requests.CustomerID, ;
Requests.LocationID, ;
Requests.VaultID, ;
Requests.MediaID, ;
Requests.ImportID, ;
Requests.Tape, ;
Requests.Slot, ;
Requests.Outdate, ;
Requests.Description, ;
Requests.HasContents, ;
Requests.DisasterTape, ;
Requests.Transmit, ;
Requests.Verified, ;
Requests.EnteredBy, ;
Requests.Entered, ;
Requests.UpdatedBy, ;
Requests.Updated, ;
Customer.Code, ;
Customer.Desc, ;
Vaults.VaultNumber, ;
Vaults.VaultName, ;
Mediatyp.mediatype ;
FROM vaultkpr!requests, vaultkpr!customer, ; vaultkpr!vaults, vaultkpr!mediatyp ;
WHERE Requests.CustomerID == Customer.ID AND ;
Requests.VaultID == Vaults.VaultID AND ;
Requests.MediaID == MediaTyp.MediaID AND ;
BETWEEN(Requests.EnteredBy, ?vp_StartUserID, ?vp_EndUserID)

DBSETPROP('lv_Requests', 'VIEW', 'Tables', 'vaultkpr!requests')
DBSETPROP('lv_Requests.CustomerID', 'FIELD', 'UPdateName', 'requests.customerid')
DBSETPROP('lv_Requests.MediaID', 'FIELD', 'UpdateName', 'requests.mediaid')
DBSETPROP('lv_Requests.VaultID', 'FIELD', 'UpdateName', 'requests.vaultid')
DBSETPROP('lv_Requests.RequestID', 'FIELD', 'KeyField', .T.)
DBSETPROP('lv_Requests.RequestID', 'FIELD', 'Updatable', .T.)
DBSETPROP('lv_Requests.CustomerID', 'FIELD', 'Updatable', .T.)
DBSETPROP('lv_Requests.LocationID', 'FIELD', 'Updatable', .T.)
DBSETPROP('lv_Requests.VaultID', 'FIELD', 'Updatable', .T.)
DBSETPROP('lv_Requests.MediaID', 'FIELD', 'Updatable', .T.)
DBSETPROP('lv_Requests.ImportID', 'FIELD', 'Updatable', .T.)
DBSETPROP('lv_Requests.Tape', 'FIELD', 'Updatable', .T.)
DBSETPROP('lv_Requests.Slot', 'FIELD', 'Updatable', .T.)
DBSETPROP('lv_Requests.Description', 'FIELD', 'Updatable', .T.)
DBSETPROP('lv_Requests.HasContents', 'FIELD', 'Updatable', .T.)
DBSETPROP('lv_Requests.DisasterTape', 'FIELD', 'Updatable', .T.)
DBSETPROP('lv_Requests.Code', 'FIELD', 'Updatable', .F.)
DBSETPROP('lv_Requests.Desc', 'FIELD', 'Updatable', .F.)
DBSETPROP('lv_Requests.VaultNumber', 'FIELD', 'Updatable', .F.)
DBSETPROP('lv_Requests.VaultName', 'FIELD', 'Updatable', .T.)
DBSETPROP('lv_Requests.MediaType', 'FIELD', 'Updatable', .F.)
DBSETPROP('lv_Requests.EnteredBy', 'FIELD', 'Updatable', .T.)
DBSETPROP('lv_Requests.Entered', 'FIELD', 'Updatable', .T.)
DBSETPROP('lv_Requests.UpdatedBy', 'FIELD', 'Updatable', .T.)
DBSETPROP('lv_Requests.Updated', 'FIELD', 'Updatable', .T.)
DBSETPROP('lv_Requests', 'VIEW', 'SendUpdates', .T.)
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform