Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table Views & Buffering
Message
De
21/05/1999 16:32:50
 
 
À
21/05/1999 16:21:00
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00221588
Message ID:
00221603
Vues:
15
>>I've created a view based on an FP table. The view (MyDeliverables) seems to be ok, I can insert, update and delete records through the view from the command line. I've created a form, placed the view in the data environment. Put a grid on the form listing the records from the grid.
>>
>>** FORM1.Init
>>
>>THIS.Grid1.RecordSource=""
>>
>>* Filter Records based on nOSPKey
>>SELECT * FROM MyDeliverables WHERE nOSPKey=THISFORM.t_nOSPKey.VALUE INTO CURSOR Q_Deliv
>>
>>THIS.Grid1.RecordSource="Q_Deliv"
>>THIS.Grid1.Column1.ControlSource="Q_Deliv.cAction"
>>THIS.Grid1.Column2.ControlSource="Q_Deliv.dDueDate"
>>THIS.Grid1.Column3.ControlSource="Q_Deliv.dcomplete"
>>
>>THIS.Grid1.Refresh
>>
>>
>>Put a delete button:
>>
>>** FROM1.cmdDelete.Click
>>
>>SET MULTILOCKS ON
>>= CURSORSETPROP('Buffering', 5, 'MyDeliverables')
>>DELETE FROM MyDeliverables WHERE nDelKey=Q_Deliv.nDelKey
>>* = TABLEUPDATE(.T.)
>>SET MULTILOCKS OFF
>>
>>Put a refresh button:
>>
>>** FORM1.cmdRefresh.Click
>>
>>THIS.Grid1.RecordSource=""
>>
>>SELECT * FROM MyDeliverables WHERE nOSPKey=THISFORM.t_nOSPKey.VALUE INTO CURSOR Q_Deliv
>>
>>THIS.Grid1.RecordSource="Q_Deliv"
>>THIS.Grid1.Column1.ControlSource="Q_Deliv.cAction"
>>THIS.Grid1.Column2.ControlSource="Q_Deliv.dDueDate"
>>THIS.Grid1.Column3.ControlSource="Q_Deliv.dcomplete"
>>
>>THISFORM.Grid1.Refresh
>>
>>When I click on the delete button, the record is delete on the view. When I click on the refresh button the record is still there and when I look at the table the record is still there. I know this all has to do with buffering settings on the form. What am I missing?
>>
>>TIA
>>
>>/Chris
>Chris,
>Is tableupdate() commented ? Uncomment, views are buffered by default. Also include viewname there, it might not be current alias.
>Cetin

I was getting a "Program error - Function requires row or table buffering" so I changed it to =TABLEUPDATE(.t.,.t.,"MyDeliverables"), it now seems to work. Any other suggestions you can pass my way?

/Chris
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform