码迷,mamicode.com
首页 > 数据库 > 详细

Visual studio 中编译错误SQL71006: Only one statement is allowed per batch. A batch separator, such as 'GO', might be required between statements.

时间:2014-08-21 11:12:33      阅读:1281      评论:0      收藏:0      [点我收藏+]

标签:io   文件   ar   cti   on   sp   sql   c   

把写好的sql脚本,并在mssqlmanager里面编译成功的存储过程脚本复制到vs项目下,出现错误信息如下:SQL71006: Only one statement is allowed per batch. A batch separator, such as ‘GO‘, might be required between statements.加上GO,出现

Error 5 SQL70001: This statement is not recognized in this context.

大意是不允许多条语句在一个脚本里面。

 

解决方案:VS错认为你的文件是DDL文件,所以它试图编译,解决方案是,右键文件---属性-----Build Action---None

Visual studio 中编译错误SQL71006: Only one statement is allowed per batch. A batch separator, such as 'GO', might be required between statements.,布布扣,bubuko.com

Visual studio 中编译错误SQL71006: Only one statement is allowed per batch. A batch separator, such as 'GO', might be required between statements.

标签:io   文件   ar   cti   on   sp   sql   c   

原文地址:http://www.cnblogs.com/shenfengok/p/3926513.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!