Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Build my own BINDEVENT for AfterInsert
Versions des environnements
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement