Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Build my own BINDEVENT for AfterInsert
Message
From
16/07/2013 21:56:58
 
 
To
16/07/2013 17:55:27
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01578580
Message ID:
01578592
Views:
72
You should provide more info on how your code is architected and what you need to do. It might be that you only need to overwrite some methods in Cursoradapters if you used them (thinking about .AfterCursorUpdate for processing after updates of all client data for a specific alias was done) or hook those methods via bindevent in other cases. Perhaps a DBC-event might help or wrapping the calls to Tableupdate in a specific function to hook into only after specific alias was updated - depends a lot on how your code is structured and if you used one of the commercial frameworks where knowledge of internal working is present in some here from their own usage.


>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform