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

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\

Replies are listed 'Best First'.
Re^4: Errror while execution query
by johngg (Canon) on Jun 06, 2006 at 14:55 UTC
    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

Re^4: Errror while execution query
by habibrahman_h (Initiate) on Jun 06, 2006 at 11:23 UTC
    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