在安装应用程序时配置SQL过程 [英] SQL PROCEDURE Configure when App Installing

查看:93
本文介绍了在安装应用程序时配置SQL过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将用C#编写的"CLR存储过程"与我的主要代码结合起来?

我的意思是,我想将它们编译到我的主应用程序中,因此,当我在数据库中创建应用程序的表时,可以同时创建过程.

如果可以这样做,我可以创建一个C#模块,该模块将在我的表上使用这些过程,并100%地确定所有内容都已更新.

非常感谢.

Is there a way to combine "CLR Stored Procedures" written in C#, with my main code?

I mean, I want to compile them into my main app, so when I''m creating my application''s tables in the database, I could create my procedure at the same time.

If I manage to do so, I could create a C# module, that will use those procedures on my tables, with 100% certainty that everything is updated.

Thanks a lot.

推荐答案

您将CLR存储的proc部署为程序集

You deploy a CLR stored proc as an assembly

CREATE ASSEMBLY myProc from ''c:\myProc.dll'' WITH PERMISSION_SET = SAFE



因此,您可以将CLR proc部署到您的应用程序文件夹,然后从那里部署它.只要您拥有适当的权限,当然可以这样做



So you could deploy the CLR proc to you application folder and deploy it from there. Provided you have the proper permissions to do so of course


这篇关于在安装应用程序时配置SQL过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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