10 Oct
2005
10 Oct
'05
8:50 a.m.
On Monday 10 October 2005 10:41, Abdul Lateef wrote:
Hi,
i am not using sql.conf at all. i have only DB connection in example.pl file.
Sure. What i want to say is to use sub CLONE to create connection for each thread like this. example.pl --//-- sub CLONE { my $db = "dbi:mysql:dbname=${db_name};host=${db_host}"; my $dbv = DBI->connect($db, $db_user, $db_pass, { RaiseError => 1, AutoCommit => 0 } ) || die "Error connecting to the database"; } --//-- This way every perl thread will have its own sql connection. function CLONE is called *automatically* when new perl thread is created. -- Best Regards, Boian Jordanov SNE Orbitel - Next Generation Telecom tel. +359 2 4004 723 tel. +359 2 4004 002