Registers a function to be called when synchronization is executed via the SQL SYNCHRONIZE statement. If a synchronization callback function is defined and registered with UltraLite, whenever a SYNCHRONIZE statement is executed, progress information for that synchronization is passed to the callback function. If no callback is registered, progress information is suppressed.
void ULRegisterSynchronizationCallback ( SQLCA * sqlca, ul_synch_observer_fncallback, ul_void * user_data );
sqlca A pointer to the SQL Communications Area.
In the C++ API use the Sqlca.GetCA method.
callback The name of your callback function.
A callback value of UL_NULL disables any previously registered callback function.
user_data An alternative to global variables to make any context information globally accessible. This is required because you can call the callback function from any location in your application. UltraLite does not modify the supplied data; it simply passes it to your callback function when it is invoked.
You can declare any data type and cast it into the correct type in your callback function. For example, you could include a line of the following form in your callback function:
MyContextType * context = (MyContextType *) user_data;
|Envoyer votre avis sur cette page par email.||Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|