[Dbi-interbase-devel] problems with procedures
Status: Beta
Brought to you by:
edpratomo
From: Brent W. <bw...@sc...> - 2002-05-07 07:24:21
|
Greetings all, Currently I am having problem with executing an internal procedure with DBD::InterBase v.30. When I execute a procedure to insert some records in to a database it is not inserting them. I am able to call the procedure from something like IB Expert and it works fine but calling it from the perl script it doesn't. I am not getting any sql error's back and for all intesive purposes it looks like it has worked but it hasn't. Here is a piece if the script that is doing the work. use DBI; $dbname = "path to DB"; $dbh = DBI->connect("dbi:InterBase:dbname=$dbname", "username", "password")|| die "could not open db"; $sth = $dbh->prepare("execute procedure InsertTraffic(?,?,?,?,?,?)") or die $dbh->errstr; open IPTABLES, '/usr/local/bin/iptables -L FORWARD -v -n -x -Z |' or die "Could not open pipe $!"; while (<IPTABLES>) { $data = $_; if ( $data =~ /FORWARD/ || $data =~ /pkts/ ) { next; } @line = split /\b/, $data; $inpackets = @line[1]; $outpackets = 0; $incoming = @line[3]; $outgoing = 0; $logdatetime = "\'NOW'"; $ip = "\'192.168.1." . @line[25] . "\'"; next if ($ip eq "\'192.168.1.0\'"); $sth->execute($ip,$logdatetime,$incoming,$outgoping,$inpackets,$outpackets) or die $dbh->errstr; } $dbh->disconnect(); Any help would be appreciated. TIA. -- Brent Wesley Systems Programmer Scanning Systems (Aust.) http://www.scanningsystems.com.au PH: 07 3809 3333 FAX: 3809 3335 http://www.humbug.org.au |