Send database records to different applications
This section of the Listener example script sets up an appropriate loop for "listening" to records inserted, deleted, or updated in the MODEL database and then sending the information to different applications using the Perl DBI module. Use this part of the example script as a guide to setting up appropriate loops to capture record activity and then sending that information to different applications using the Perl DBI module.
The Listener example script sets up an appropriate loop for capturing record activity in the MODEL database and then sending that information to an Oracle database as follows:
use DBI; 1
.
.
.
$dbname = 'modelEntities'; $user = 'foo'; 2
$password = 'foobar'; $dbd = 'Oracle';
$dbh = DBI->connect($dbname, $user, $password, $dbd);
. . .
. . .
$dbh->do($statement);
The following list explains the specific numbered items in the previously listed section of the Listener Perl script example:
- Declares use of the Perl DBI module. See the Perl DBI documentation for more information.
- Sets up the appropriate code to send database information to the
Oracle database. Note the use of the DBI
connectmethod.