in reply to Re: Errror while execution query
in thread Errror while execution query

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^3: Errror while execution query
by gellyfish (Monsignor) on Jun 06, 2006 at 10:42 UTC

    Yes, because it is a method call, you can't do it inside a quoted string. You could do something like:

    $result->execute() or print "Error while executing query --- " . $resu +lt->errstr();

    /J\

      I think you might be able to put a method call inside a double-quoted string by surrounding it with list constructor and de-references like this

      $result->execute() or print "Error while executing query --- @{[$result->errstr()]}";

      but whether you would want to is another matter as it looks a bit messy. If you have a call in the middle of a string then it might make more sense as you don't have to keep closing and opening quotes.

      Cheers,

      JohnGG

      Thanks.

      The following error message was printed..

      Error while executing query --- [Microsoft][ODBC SQL Server Driver]Connection is busy with results for + another hstmt (SQL-HY000)(DBD: st_execute/SQLExecute err=-1)


      The solution to the problem is to include the following line in the code.

      $dbh->{odbc_SQL_ROWSET_SIZE} = 2;

      Regards