English 中文(简体)
如何通过 LINQ 获取 Exec 声明的结果
原标题:how to get the result of exec statement via LINQ

i 在 sql- Server- 2008 程序中有问题创建的选定语句

我被这样处决了:

CREATE PROCEDURE DoSomething
AS
BEGIN
declare @command nvarchar(500);
set @command = N select * from sometable ;
exec @command;
END

of course the select statement is not this simple I add this procedure to linq class and got this message: enter image description here - if i can t use this method to call this procedure what can i do - or is there anything i can do else

编辑 :

I even tried to run this procedure via ado.net but i got exception: SqlException procedure select * from sometable does not exist

任何替代方式请

问题回答

基于错误消息, 您似乎存储的 proc 正在返回多个结果集, 或者您正在使用临时表格

看看这些员额

Post 1

Post 2





相关问题
Performance impact of indexed view in MS SQL Server 2008

Does anyone have experience with using indexed view in MS SQL Server 2008? I am trying to find out how does indexed view affect performance of insert / update statements, that are adding / updating ...

Lock Escalation - What s happening here?

While altering a table (removing a column) in SQL Server 2008, I clicked the Generate Change Script button and I noticed that the change script it generated drops the column, says "go" and then runs ...

Round to nearest 5 in SQL Server

I have a Money column in my SQL Server 2008 table. In my below query how can I round it to nearest 5$ select FineAmount from tickets Thanks

热门标签