Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table Views & Buffering
Message
From
21/05/1999 16:21:00
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
21/05/1999 16:12:50
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00221588
Message ID:
00221595
Views:
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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform