Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Build my own BINDEVENT for AfterInsert
Message
De
16/07/2013 17:55:27
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Build my own BINDEVENT for AfterInsert
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01578580
Message ID:
01578580
Vues:
75
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
Fil
Voir

Click here to load this message in the networking platform