Hi perlies...
I've got a function wraping DBI::fetchrow()
like this:
sub fetchrow_sql()
{
my $sth=$_[0];
$sth->fetchrow()
}
That i use in this two fashions:
A) Assigning result to an array
$dbh=DBI->connect(...);
sql = "select a,b from table";
$sth=$dbh->prepare($sql) or mierror("Error $DBI::errstr");
$sth->execute() or mierror("Error $DBI::errstr");
while (@whatever = fetchrow_sql($sth)
{
....
}
b) Assigning result to a single variable
$dbh=DBI->connect(...);
sql = "select a from table";
$sth=$dbh->prepare($sql) or mierror("Error $DBI::errstr");
$sth->execute() or mierror("Error $DBI::errstr");
while ($whatever = fetchrow_sql($sth)
{
....
}
For the moment, it works right but there's a problem, COBOL fools have inserted in the database registers with '#' so i have to filter it, in order to avoid programs processing the char. Anyone can please give me an idea of the best way to modify my wrapper function fetchrow_sql to filter the results before passing them onto the external code?
thanks.
_______________________________________________ Perl-Win32-Users mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
