amitvalia has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to set the connectionTimeout and CommandTimeout properties in ASP using PerlScript. I'm doing this because some of my queries are coming back with
Query Timeout Expired error.
Hence I try to set the commandTimeout parameter to 120. That's when I get another error.
PerlScript Error error '80004005' (in cleanup) Can't modify non-lvalue subroutine call
My code is
$Conn = $Server->CreateObject("ADODB.Connection"); $Conn->Open( "Provider=SQLOLEDB;User ID=USER;Password=PASSWORD;Initial + Catalog=DB;Data Source=SERVER" ); $Conn->CommandTimeout = 120; $timeout = $Conn->CommandTimeout; $sql = "Select Col1,Col2 from Table1 "; $RS = $Conn->Execute( $sql,CommandTimeout=120); if($Conn->Errors->{Count} > 0) { %> Error is <% =$Conn->Errors(0)%> ...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Setting CommandTimeout
by NetWallah (Canon) on May 05, 2016 at 20:57 UTC | |
by amitvalia (Novice) on May 05, 2016 at 22:37 UTC | |
by amitvalia (Novice) on May 05, 2016 at 22:40 UTC | |
by NetWallah (Canon) on May 06, 2016 at 00:47 UTC | |
Re: Setting CommandTimeout
by thezip (Vicar) on May 05, 2016 at 20:57 UTC | |
by amitvalia (Novice) on May 05, 2016 at 21:57 UTC |