i think i wasnt able to define the problem clearly... i am getting the data locally in "@row" and then using this data as parameter for the subsequent query which accesses a different database on a different host .. the trouble is usage of two database handles... they dont work together ... if the 1st connection is open using $dbh1 the second connection cannot be opened using $dbh2 , i have close the connection and open a new connection on same database handle to prepare the the next query i would like to use different databse handles for each new connections i open