【发布时间】:2011-09-15 21:19:43
【问题描述】:
- 有没有可能用C#做一个大项目(功能很多),那么,
- 然后为它创建 CLR 程序集,
- 在 SQL Server IN A STORED PROC 中,调用程序集中的函数,
-
表(我将传递给 ASSEMBLY)在其他存储过程中计算...
- 如果是这样,步骤是什么?
我在想这样的事情。
-- I have a stored proc that gets a table, let it be myStoredProcTable
--FIST ENABLE DATA ACCESS
EXEC sp_serveroption 'TheServerName', 'DATA ACCESS', TRUE
--main.sql calls yStoredProcTable.sql and the calls functionAssembly
SELECT *
INTO #tmpTable
FROM OPENQUERY(SERVERNAME, 'EXEC test.dbo.myStoredProcTable 1')
-- pass the table to assembly
-- how would i pass the table to assembly code?, Is this POSSIBLE?
EXEC functionAssembly #tmpTable
------------------------------------------编辑
关注@faester 回复:
- 我怎么能在代码中使用 XML,我建议使用 numberTOstring 的东西,但我猜 XML 选项在这里是最好的......
再一次,我真的这样做了,即使不是最好的选择......
【问题讨论】:
-
嗯,我愿意,但这些步骤已经完成。我是这么想的
I can make a bridge for all this code -
你的设计是 thedailywtf.com 的红地毯
-
你知道...现实世界的问题非常疯狂...
标签: c# sql xml com .net-assembly