Home > Database > Mysql Tutorial > A rowset based on the SQL command was not returned by the OL

A rowset based on the SQL command was not returned by the OL

WBOY
Release: 2016-06-07 15:44:16
Original
1175 people have browsed it

今天使用 SSIS OLEDB Source 调用存储过程出现下面的错误: A rowset based on the SQL command was not returned by the OLE DBprovider 解决办法: 在存储过程中使用 set nocount on ; 原因: 因为执行存储过程中返回影响行数信息先于真实的数据返回,而 S

今天使用SSIS OLEDB Source 调用存储过程出现下面的错误:

 

A rowset based on the SQL command was not returned by the OLE DBprovider

 

解决办法:

 

在存储过程中使用 setnocount on ;

 

原因:

 

因为执行存储过程中返回影响行数信息先于真实的数据返回,而SSIS尝试读取这个结果集,导致出现错误。使用set nocount on之后阻止在结果集中返回可显示受 Transact-SQL语句或存储过程影响的行计数的消息从而只返回真正的结果集。

 

 

 

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template