In 9.0.1 the MESSAGE ... FOR CONNECTION feature was added that allows a
message to be sent to another connection. The connection receiving the
message would get the message through a callback function when the current
request finished, or promptly if a WAITFOR DELAY statement was executing.
In 11.0.1 the MESSAGE ... FOR CONNECTION ... IMMEDIATE syntax was added
which allowed a second connection to receive a message promptly without
needing to be making requests or be executing the WAITFOR DELAY statement.
That said, I'm not sure if it is possible to register the ODBC message
callback function from PowerBuilder. The message callback function is
registered using the SQLSetConnectAttr( ... SA_REGISTER_MESSAGE_CALLBACK
... ) ODBC call.
Ian McHardy (Sybase iAnywhere)
Please reply only to the newsgroup.
SQL Anywhere 11 FAQ - http://www.sybase.com/detail?id=1064084
SQL Anywhere Developer Community -
SQL Anywhere Blog Center - http://www.sybase.com/sqlanyblogs
Is there any way to push notification from the database to a PowerBuilder
application? I've played around with the "MESSAGE" statement with no luck.
I have two applications on two different machines. App 1 inserts data into
the database. App 2 needs to see this new data in as close to real time as
possible. Currently, I have to have app 2 poll the database for changes.
:( It would be much more elegant if the database could push some kind (any
kind) of notification to app2 when app1 did an insert.