Subject problem getting data to print with firebird/perl
Author greatestates2001
Hello,

I am new to this and have been able to insert and update data in the
database however I am having problems retrieving it. I am wondering if
it's my perl code below or maybe there is some database setting that
won't allow data to be pulled from Firebird and be posted. Maybe like
a write only setting or something.

Thanks for any help you have to offer.

-----------------------------------------------------

#!/usr/local/bin/perl


use CGI;

use CGI::Carp qw/fatalsToBrowser/;

use DBI;

use DBD::InterBase;
use strict;
use warnings;
use diagnostics;

my $ibase_database='***removed***';
my $ibase_path='***removed***';
my $ibase_user='***removed***';
my $ibase_passwd='***removed***';

my ($RECNUM);
my ($query);
my ($dsn);
my ($sth);
my ($count);
my ($row);

$query = new CGI;

print $query->header;

my $chars = "ISO8859_1";
$dsn =
"dbi:InterBase:dbname=$ibase_database;host=$ibase_
path;ib_dialect=3;ib_charset=$chars";

my $dbh = DBI->connect($dsn, $ibase_user, $ibase_passwd ) || die
"Could not connect";


# Define our SQL statement
my $sql = qq/
Select *
from UNITLIST
/;

$sth = $dbh->prepare( $sql );

if( $sth ){
$sth->execute();
print "sth executed.<br>\n";
$row = $sth->fetchrow_array( );
print "Row: ".$row[0]."<br>\n";
$sth->finish();
} else {
print "Could not prepare query.<br>\n";
}


$dbh->disconnect();

exit;