From: Samrat G. <sg...@he...> - 2003-09-03 00:49:00
|
Hi Carlos, The situation is, I have 2 users on two different computers. One of them has executed a procedure which inserts a row in a table "and has commited the transaction and released the connection." The procedure has a POST_EVENT ('string') in it with suspend for returning output values. How with the help of FBEvents can, the other user know that, a new row has been created in the database? (He is listening for events in a different connection.) The example which you gave, is possible on the same computer with the 'same' connection although, the "processEvent" is being raised as soon as I have done queEvents. If I am not wrong, the RegisterEvents is the same for embedded SQL EVENT INIT and the QueEvents is the same for embedded SQL EVENT WAIT. But the events should be generated across all connections who are listening for it, like the second user. Any help would be appreciated. regards, Samrat. -------------------------------------- > Can anyone please tell me what I am doing wrong? Can you send a test case ?? Here the sample of the NUnit test:: FbEvent FbEvent = new FbEvent(connection); FbEventAlertEventHandler e = new FbEventAlertEventHandler(processEvent); FbEvent.EventAlert += e; FbEvent.RegisterEvents("new row", "updated row"); FbEvent.QueEvents(); FbCommand command = new FbCommand("UPDATE test_table_01 SET char_field = 'events test'", connection , transaction); command.ExecuteNonQuery(); transaction.Commit(); FbEvent.QueEvents(); -- Bets regards Carlos Guzmán Álvarez Vigo-Spain ---------------------------------------------- Hi, I had a question about POST_EVENT and register events. In my procedure I have a line POST_EVENT('NEW CUST'). In the front end .NET, using FirebirdNETProvider1.5-Alpha1, I am listening for events as follows: Public fbEv As FbEvent fbEv = New FbEvent(conn) fbEv.RegisterEvents(New String() {"NEW CUST"}) fbEv.QueEvents() AddHandler fbEv.EventAlert, AddressOf listenEv End Sub Public Sub listenEv(ByVal sender As Object, ByVal e As FirebirdSql.Data.Firebird.Events.FbEventAlertEventArgs) MsgBox("Customer Created") End Sub I am not being able to receive the Event. Can anyone please tell me what I am doing wrong? Regards, Sam. |