Skip to content

SQLSTATE[IMSSP]: The active result for the query contains no fields. #507

@dipens

Description

@dipens

I have this very simple stored procedure execution on my server setup (SQL Server 2012 on a Windows Server connected to Ubuntu 16.04 running Symfony 3.3 on PHP 7.1 using these drivers ofcourse)

$connection = $em->getConnection()->getWrappedConnection();
$stmt = $connection->prepare('StoredProcedureName @a= :a, @b= :b, @c= :c');
$stmt->execute(array(
    'a'=> 'a',
    'b'=> 'b',
    'c'=> 'c',
));
$stmt->nextRowset();
$result = $stmt->fetchAll();

This works fine when there are records being returned. but sometimes depending on the parameters, the stored procedure returns no records. That's when I get this error:

SQLSTATE[IMSSP]: The active result for the query contains no fields.

I have already looked into here, here, here, and in issues here too but couldn't find a solution. I have already set SET NOCOUNT ON in the beginning of the stored procedure.

Is there anything I am missing here or is this a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions