调试存储过程发现某字段NULL,拼成的SQL最后啥也没有了。。。
原因是存储过程没有执行到查询SQL语句
QueryAsync throws "No columns were selected" when stored proc doesn't perform a select statement #591
Closed toannguyen83 opened this issue on Aug 27, 2016 · 18 comments ClosedQueryAsync throws "No columns were selected" when stored proc doesn't perform a select statement#591
toannguyen83 opened this issue on Aug 27, 2016 · 18 commentsComments
toannguyen83 commented on Aug 27, 2016
Tested on Dapper 1.42 and 1.50.2 The following sql statement will simulate creating a temp stored proc and execute it with dapper
When using Query version, it works fine and no results return. When using QueryAsync version, it throws "No columns were selected" error. I attached a code sample using microsoft localdb. The sample project is using Dapper 1.50.2 and structure similar to the one I submitted in #501 |