$db_handler = "dbi:SQLite:$database:$host";#used host name to connect to the remote machine but not sure if its correct. $DBIconnect = DBI->connect($db_handler, $user, $pw) or die die "Unable to connect: $DBI::errstr\n"; $a_query = "SELECT * FROM $tablename where user_name=\"psibond\""; $res = $DBIconnect->prepare($a_query);