Our application (PB 2022 R2) connect to a SQL Anywhere 17 db.
By a inherited transaction object.
We do have also C# applications that also connect to the same database.
From the C# application we like to send a message to the PowerBuilder application.
The PB application should catch the message (by some event) and pops the message, or do something with it.
In SQL Anywhere we cal sent a message using the SQL statement MESSAGE.
For example:
MESSAGE 'this is a message' TO CLIENT FOR CONNECTION 123 ;
But how can I catch this message in the transaction object?
I googled for a while and found something around db_register_a_callback.
Anybody any idea how to solve this?
Maybe a complete other way..?
Thanks
Hans
The following code return a -5 when I use 'w_test'. w_test is a window that is opened already.
Then I use 'w_t', a window object that is not opened already, I got a -50.
But this if I got this to work it will only work if the C# app is running at the same PC. That is not always the case.
integer ll_return
dno_test = CREATE dotnetobject //dno_test is an instance variable
IF IsValid(dno_test) THEN
ll_return = dno_test.RegisterObject("w_test", w_test)
if ll_return <> 1 then
MessageBox("Error", "RegisterObject w_dotnettest failed" + String(ll_return))
end if
ELSE
MessageBox("Error", "RegisterObject not created..?")
END IF