10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

How You Can Communicate Between OpenROAD Applications Using Database EventsHow You Can Create, Register, and Raise EventsHow You Can Create the EventThe tasks of creating, registering, and raising events are performed with theSQL statements, create dbevent, register dbevent, and raise dbevent,respectively. This section provides a brief overview of each statement as it isused in the OpenROAD programming environment.The SQL create dbevent statement creates a database event. When you createa database event, you are the owner of the event, and it is part of thedatabase with which you were connected when you created the event, forexample:initialize()={create dbevent myevent;commit;}How You Can Register the EventGenerally, you can create database events outside of the applications thatsend or receive them. When you are designing your applications, you candecide what database events are needed and create them all at once.However, it is possible to create and send a database event in the sameapplication.Each frame must be registered to receive those database events that you wantit to receive. To register a frame for a database event, you use the registerdbevent statement. Generally, you place the register dbevent statement in theframe's initialize statement block. However, you can put it in an event block ifyou want, for example:initialize()={register dbevent myevent;commit;}An event registration is associated with a specific session. The frame receivesall events for which it is registered in any currently open session. However, toprocess the event, the frame must be working in the session where the eventwas registered when the event reaches the top of the frame's event queue.Inter-Frame Communication Techniques 359

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!