use DBI; $dsn = "MADDY"; $user = "Maddy17"; $pw = ""; $dbh = DBI->connect('$dsn,$user,$pw'); $sth = $dbh->prepare ("select * from sysobjects where name = 'pub_titles' and type = 'P' and uid = USER_ID()"); $sth->execute(); while ( @row = $sth->fetchrow_aray ) { print "@row\n"; } $dbh->disconnect();