General information
Category:
Coding, syntax & commands
Title:
Build my own BINDEVENT for AfterInsert
Environment versions
Network:
Windows 2008 Server
Hello comunity
i need to build my own custom BINDEVENT for AfterInsert. I have my table Ft (Invoice Header) and FI (Invoice Lines).
My frontend is VFP9 and my database is SQL Server.
The unique way to build the code above is to place a non visible grid because on this object i can put XBASE coding.
the object SFT.Bok1.Okbuttomdef1 is my button SAVE on my form
My custom BINDEVENT code is:
PUBLIC oHandler
oHandler = NEWOBJECT( "myhandler" )
BINDEVENT( SFT.Bok1.Okbuttomdef1, "Click", oHandler, "mymove" )
DEFINE CLASS myhandler AS Session
PROCEDURE mymove
if tableupdate(0,.T.)
messagebox("Record Save afterInsert")
endif
RETURN
ENDDEFINE
I´am not sure that my code run only when records are save on my 2 sql server tables FT and FI, or they run even if the record is not yet save.
Could someone give me an ideia and example to solve my problem ?
Many thanks
Luis Santos
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only