Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
EView quirck
Message
De
30/11/1999 14:38:51
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00296996
Message ID:
00297053
Vues:
33
>The program below generates an example of a problem I had with eView: can't set TblC and all of it's fields to be updatable.
>

This is not an eView problem per se, just an issue with VFP's finickiness. I played with your view definition by changing several things in eView until I got it to work. Key changes: give all of the fields in tblc complete update names including table and dbc name (eView gives you a hint to do this when you try to save this view) using the format dbc!table.field, changed the view's tables property to read evt!tblc.

Following is the complete view definition, modified to update correctly, as generated by eView:


***************** Begin View Definition LV_EVT ***************

CREATE SQL VIEW "LV_EVT" ;
AS SELECT pkTblA, one.pkTblB, TblC.*, two.pkTblB FROM TblA JOIN TblB one ON pkTblA = one.fkTblA JOIN TblC ON one.pkTblB = fkTblB1 JOIN TblB two ON two.pkTblB = fkTblB2

DBSetProp('LV_EVT', 'View', 'UpdateType', 1)
DBSetProp('LV_EVT', 'View', 'WhereType', 1)
DBSetProp('LV_EVT', 'View', 'FetchMemo', .T.)
DBSetProp('LV_EVT', 'View', 'SendUpdates', .T.)
DBSetProp('LV_EVT', 'View', 'UseMemoSize', 255)
DBSetProp('LV_EVT', 'View', 'FetchSize', 100)
DBSetProp('LV_EVT', 'View', 'MaxRecords', -1)
DBSetProp('LV_EVT', 'View', 'Tables', 'evt!tblc')
DBSetProp('LV_EVT', 'View', 'Prepared', .F.)
DBSetProp('LV_EVT', 'View', 'CompareMemo', .T.)
DBSetProp('LV_EVT', 'View', 'FetchAsNeeded', .T.)
DBSetProp('LV_EVT', 'View', 'FetchSize', 100)
DBSetProp('LV_EVT', 'View', 'Comment', "")
DBSetProp('LV_EVT', 'View', 'BatchUpdateCount', 1)
DBSetProp('LV_EVT', 'View', 'ShareConnection', .F.)

*!* Field Level Properties for LV_EVT
* Props for the LV_EVT.pktbla field.
DBSetProp('LV_EVT.pktbla', 'Field', 'KeyField', .F.)
DBSetProp('LV_EVT.pktbla', 'Field', 'Updatable', .F.)
DBSetProp('LV_EVT.pktbla', 'Field', 'UpdateName', 'TblA.pktbla')
DBSetProp('LV_EVT.pktbla', 'Field', 'DataType', "I")
* Props for the LV_EVT.pktblb_a field.
DBSetProp('LV_EVT.pktblb_a', 'Field', 'KeyField', .F.)
DBSetProp('LV_EVT.pktblb_a', 'Field', 'Updatable', .F.)
DBSetProp('LV_EVT.pktblb_a', 'Field', 'UpdateName', 'tblb.pktblb')
DBSetProp('LV_EVT.pktblb_a', 'Field', 'DataType', "I")
* Props for the LV_EVT.pktblc field.
DBSetProp('LV_EVT.pktblc', 'Field', 'KeyField', .T.)
DBSetProp('LV_EVT.pktblc', 'Field', 'Updatable', .T.)
DBSetProp('LV_EVT.pktblc', 'Field', 'UpdateName', 'evt!tblc.pktblc')
DBSetProp('LV_EVT.pktblc', 'Field', 'DataType', "I")
* Props for the LV_EVT.fktblb1 field.
DBSetProp('LV_EVT.fktblb1', 'Field', 'KeyField', .F.)
DBSetProp('LV_EVT.fktblb1', 'Field', 'Updatable', .T.)
DBSetProp('LV_EVT.fktblb1', 'Field', 'UpdateName', 'evt!tblc.fktblb1')
DBSetProp('LV_EVT.fktblb1', 'Field', 'DataType', "I")
* Props for the LV_EVT.fktblb2 field.
DBSetProp('LV_EVT.fktblb2', 'Field', 'KeyField', .F.)
DBSetProp('LV_EVT.fktblb2', 'Field', 'Updatable', .T.)
DBSetProp('LV_EVT.fktblb2', 'Field', 'UpdateName', 'evt!tblc.fktblb2')
DBSetProp('LV_EVT.fktblb2', 'Field', 'DataType', "I")
* Props for the LV_EVT.pktblb_b field.
DBSetProp('LV_EVT.pktblb_b', 'Field', 'KeyField', .F.)
DBSetProp('LV_EVT.pktblb_b', 'Field', 'Updatable', .F.)
DBSetProp('LV_EVT.pktblb_b', 'Field', 'UpdateName', 'tblb.pktblb')
DBSetProp('LV_EVT.pktblb_b', 'Field', 'DataType', "I")
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform