reinaldocrespo wrote:hmpaquito;
Let's move this thread over to the spanish forum. ...y evitamos incomodar a los que no entienden. In the mean while; please excuse me for answering in English.
I will attempt to explain ADS Notifications:
Notifications provide a mechanism for communicating to a client that something has occurred. For example, notifications can be used to inform a client application that data in a critical table has changed. The client application can then use this information to refresh() an xbrowse (or some other control) of that table and thus provide the user with more up to date information (without having to "poll" the table).
A Notification might be used to signal a client that a record has been added to a special table created for purpose of communicating messages from the system administrator to the end users. The client application can then read the latest message and display it within its interface.
A Notification might be used to signal a client that a record has changed. The client app my make a decision based on what changed on that particular record. Perhaps create an entry on a queue to send some information via email. Then a client app listening for such notifications can take care of sending the email.
These are all typical situations where an ADS Notification might be used. No coding. No .prg. ADS provides an API to create a notification, to listen for notifications, to know if a notification has been issued while the app was not listening. etc...
Specifically ADS API provides "sp_SignalEvent()" to create a Notification based on some condition. That part can be stored on the ADS Data Dictionary as a trigger so that you never have to tell the server again to issue a Notification based on that condition. The server always knows because you saved that as a "trigger" info on the Data Dictionary. Then API function "sp_WaitForEvent()" will inform the client application if an event has occurred.
On a single threaded app, you test for notifications by using a repeated periodic call with short timeouts -i.e. "polling". But not polling the table but rather polling for the event notification. Due to its nature, polling will not actually notify the client app when a change has occurred, but rather notifies the client that a change HAS occurred sometime between now and the last check. But that works just fine.
So, In essence, with ADS notifications you take care of "events" on any table without having to write or "invent the wheel". The wheel is already invented and running smoothly. For more information about ADS notifications; please visit http://devzone.advantagedatabase.com.
Hope that helps,
Reinaldo.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Willi Quintana and 24 guests