“The active result contains no fields” using PDO with MS SQL

前端 未结 6 1272
没有蜡笔的小新
没有蜡笔的小新 2020-12-10 02:29

I am in the process of converting some old PHP pages to use PDO.

Below are two simplified queries (not my actual queries) to aid understanding of the problem I\'m ha

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-10 02:50

    If you are using a stored procedure then use

    SET NOCOUNT ON 
    

    The problem is that the stored procedure returns a result containing the number of rows affected as the first result.

    Microsoft Documentation

提交回复
热议问题