use DBI(); $dbh = DBI->connect("dbi:ODBC:TLRS",'sa','') or die "$DBI::errstr\n"; ****$sth=$dbh->prepare("SELECT * FROM users where user like'sparkie' and passwd like 'foo' "); $sth->execute(); while($ref = $sth->fetchrow_hashref) { print"$ref->{'user'},$ref->{'passwd'},$ref->{'allow'}\n"; } $sth->finish(); $dbh->disconnect;