### Connect to the database my $dbh = DBI->connect( "dbi:ODBC:hengaini","dba","sql", { RaiseError => 1 }); my $sth = $dbh->prepare("select * from dw"); $sth->execute() or die"Can't execute SQL statement:$DBI::errstr"; my @row; while( @row = $sth->fetchrow_array()){ print "Row:@row\n"; }