从wcf服务调用时,存储过程不起作用 [英] stored procedure not working when calling from wcf service

查看:110
本文介绍了从wcf服务调用时,存储过程不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个存储过程,它基本上会根据作为参数传递给sp的字符串插入和更新,如果在SSMS中执行sp,sp工作正常,但是如果我使用WCF服务从SL5应用程序调用相同的sp,则返回我从sp传递的保存信息,但如果我通过sp查询表插入,则需要时间列出10列3列记录,而我需要花时间查询sp_who2,这表明select语句被阻塞了SPID,这是来自SL5应用程序,如何解决此问题并插入/更新freom UI

i have a stored procedure it will basically insert and update based on a string passed as parameter to sp, sp works fine if it is executed in SSMS, but if i invoke the same sp from SL5 application using WCF Service it returns the saved information which i pass from the sp, but if i query the table insert thru sp, it takes time to list 10 records with 3 columns, while it taking time i queried using sp_who2 which show the select statement is blocked a SPID, which was the one from SL5 Application, How to resolve this and insert / Update freom UI

推荐答案

基于作为参数传递的字符串



你的意思是它使用的是动态SQL吗?如果是这样,也许以下内容将有所帮助:

http://www.sommarskog.se/dynamic_sql.html [ ^ ]
"based on a string passed as parameter"

Do you mean it's using dynamic SQL? If so, maybe the following will help:
http://www.sommarskog.se/dynamic_sql.html[^]


这篇关于从wcf服务调用时,存储过程不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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