go ahead... be a heretic | |
PerlMonks |
Re^3: Can i execute two queries connecting to same DB at a time.by Anonymous Monk |
on May 07, 2009 at 06:55 UTC ( [id://762500]=note: print w/replies, xml ) | Need Help?? |
Below is the my code my ( $data_source, $user_id, $password ) = qw( PHOENIX DBADMIN DBADMIN );
my $conn_string = "driver={SQL Server};Server=$data_source;Database=$database;UID=$user_id;PWD=$password";
my $dbh = DBI->connect( "DBI:ODBC:$conn_string" ) or die $DBI::errstr;
my $sql1 = "SELECT CONTENT_HASH FROM DS_STAGING_CONTENTHASH where STAGING_STATUS_GID!=210";
my $sth = $dbh->prepare( $sql1 );
$sth->execute;
In this i executed only one query (above code works fine). But when i try to execute another query by
my $sql2 = "SELECT CASESHARE_PATH FROM DS_CASESHARE";
my $sth2 = $dbh->prepare( $sql2 );
$sth2->execute;
This gives error as i mentioned above
In Section
Seekers of Perl Wisdom
|
|