如何在asp经典中运行ms sql批处理 [英] how to run ms sql batch in asp classic

查看:90
本文介绍了如何在asp经典中运行ms sql批处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们好,



我希望从asp网站脚本调用ms-sql批处理。



我的意思是,格式为:

Hello friends,

I wish to invoke a ms-sql batch from an asp web site script.

I mean, the format is:

declare @a int, @b int;
set @a = 1;
set @b = 2;
select @a, @b;



想得到结果。



运行ddl没问题dml如:


And would like to get the results.

I have no problem with running ddl and dml like:

select a=1, b=2;

但是为了处理条件语句和循环语句,需要批处理语法。



请指教,

alex

But the batch syntax would be needed in order to process conditional and loop statements.

please advise,
alex

推荐答案

感谢RaisKazi的漂亮印刷:)。

好​​吧,这里我按照错误代码找到了答案。

我的第一行sql应该是:



SET NOCOUNT ON ;



不再需要。

希望有人会喜欢。

alex
Thanks RaisKazi for the prettyprinting :) .
Well, here I found the answer by following the error code.
My first sql row should be :

SET NOCOUNT ON;

Nothing more needed.
Hope someone would enjoy.
alex

这篇关于如何在asp经典中运行ms sql批处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆