Article ID: 132467
Article Last Modified on 8/25/1999
CREATE DATABASE Mydata && Creates the database container MODIFY DATABASE Mydata && Opens the database container
PROCEDURE MYCOL
=MESSAGEBOX("My Column Rule")
PROCEDURE MYROW
=MESSAGEBOX("My Row Rule")
PROCEDURE MYINS
=MESSAGEBOX("My Insert Trigger")
PROCEDURE MYDEL
=MESSAGEBOX("My Delete Trigger")
PROCEDURE MYUPD
=MESSAGEBOX("My Update Trigger")
CREATE TABLE Mytab(Fname C(15),Lname C(15) UNIQUE CHECK Mycol(), ;
MI C(2),CHECK Myrow())
CREATE TRIGGER ON Mytab FOR UPDATE AS Myupd()
CREATE TRIGGER ON Mytab FOR INSERT AS Myins()
CREATE TRIGGER ON Mytab FOR DELETE AS Mydel()
OPEN DATABASE Mydata
SET MULTILOCKS ON && Required for buffering.
=CURSORSETPROP("Buffering",1) && Turns Buffering Off
Or on the Tools menu, click Options, and then click the Data tab and
set buffering to Off.
? CURSORGETPROP("Buffering")
This returns the value of the Buffering level:
1=OFF
2=RECORD(PESSIMISTIC)
3=RECORD(OPTIMISTIC)
4=TABLE(PESSIMISTIC)
5=TABLE(OPTIMISTIC)
SET MULTILOCKS ON && If you have not done so previously.
=CURSORSETPROP("Buffering",2)
Or on the Tools menu, click options. Then click the Data tab and set
buffering to Record(Pessimistic).
SET MULTILOCKS ON && If you have not done so previously.
=CURSORSETPROP("Buffering",4) && Table(Pessimistic)
Or on the Tools menu, click options. Then click the Data tab and set
buffering to Table(Pessimistic)
=TABLEUPDATE(.t.)
You will see the DELETE trigger(s) fire as the table is updated from the
buffer. You will see the same behavior for buffering level 5. To close
the table, use TABLEUPDATE(.t.).
=CURSORSETPROP("Buffering",1)
Or on the Tools menu, click options. Then click the Data tab and set
buffering to OFF
Additional query words: VFoxWin events
Keywords: KB132467