anasgr has asked for the wisdom of the Perl Monks concerning the following question:
I have installed Active Perl in MSSQL server from where I am running this script. I also created the ODBC System DSN (LocalServer) with following attributes:--use strict; use DBI ; #use DBD::ODBC; my $sql = qq { select DISTINCT account from accountsize }; my $dbh = DBI->connect("dbi:ODBC:LocalServer") or die; my $sth = $dbh->prepare("select account from accountsize") or die "err +or" . $dbh->errstr; $sth->execute( ) or die; my @row; while (@row = sth->fetchrow_array) { print "$row[0]\n"; } $sth->finish(); $dbh->disconnect();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI error Can't locate object method "fetchrow_array"
by logie17 (Friar) on Aug 03, 2009 at 17:56 UTC |