#!/usr/local/bin/perl -w use CGI; use DBI(); use warnings; use utf8; $q = CGI->new; $q->header(-encoding => 'UTF-8', -charset => 'UTF-8', -expires => '-1d'); print "Content-Type: text/html; charset=UTF-8"; print $q->header; print $q->start_html(-title => 'Test Heb'); $sql = <connect($data_source, $user, $password) or &errSub("Problem.\nCan't connect to SQL.",__LINE__,1); $dbh->{'LongReadLen'} = 25000; $dbh->{'LongTruncOk'} = 1; $dbh->do(q/SET names 'utf8'/); $sth = $dbh->prepare($sql); $sth->execute() or &errSub("Problem.\nCan't excute SQL query [$DBI::errstr].\nFailed search.",__LINE__,1); $rows = $sth->rows; if ($rows) { print "
\n";
	while ($ref = $sth->fetchrow_hashref()) {
		$AccountIdName =  ($ref->{'AccountIdName'} || 'Null');
		print "$AccountIdName\n";
	}
	$sth->finish();
} else {
	$sth->finish();
	next;
}


$dbh->disconnect;
exit 0;