Skip to content

FieldCount throws InvalidOperationException in 0.60.1 #728

Description

@bgrainger

Fixed in 0.60.1.

There are cases when we check the data reader FieldCount property, in order to know if we should read the data reader. With the latest update, all these checks on the data reader are throwing exceptions, when the reader is empty and only output parameters are returned.

This breaks some of our property checks on the data reader, where until now no exception was expected.

Also, executing a query that, by its nature, does not return rows (such as a DELETE query), should set FieldCount to 0. What about the HasRows property?

Originally posted by @kostebudinoski in #722 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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