开发者

How to use a system stored procedure in LINQ to SQL

I'd like to add the "msdb.dbo.sp_help_job" system stored procedure to a LINQ to SQL object, b开发者_运维技巧ut I can't figure out how to specify it. If I create a new Data Connection in Server Explorer and specify the "msdb" database of the server I want, and navigate to "Stored Procedures", that procedure is not listed. Am I looking in the wrong place?

I've added regular (user defined) stored procedures in the past with no problem. I know I could get there by executing it via "ExecuteCommand" on the data context, and I could also create a "wrapper" stored procedure that did nothing but call "sp_help_job", but I'd like to know how to hook it up directly to LINQ, or if it's even possible.


The System Stored Procedures are not actually sitting inside your database, but rather the Read-Only Resource database.

http://msdn.microsoft.com/en-us/library/ms190940.aspx

However, here's how you can make it possible to find them:

Accessing System Databases/Tables using LINQ to SQL?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜