无限参数化存储过程 [英] Infinity parameterized Store Procedure

查看:135
本文介绍了无限参数化存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的,
我需要制作一个存储过程,该存储过程根据需要采用任何表名和字段.
例如:
我有一个表名员工所属的字段名,如empID,empName,empAddress

那么它将使用一个参数表名称employee和其他三个参数以及其他字段名称.

另一个表名称供应商所属的字段名称,例如spID,spName,spAddress,spCellNo,spEmail等,

因此,我需要一个全局插入存储过程,该过程属于任何表名和表字段的任何计数的参数.

我如何在sql server 2005中开发此存储过程,显然是从C#调用的?

任何想法都将不胜感激.
在此先感谢
马哈茂德
软件工程师

Dear,
I need to make a store procedure that takes any table name and field based on requirement.
example:
I have a table name employee belongs field name like empID,empName,empAddress

then it will take one parameter table name employee and other three parameter as well other field name.

another table name supplier belongs fields name like spID,spName,spAddress,spCellNo,spEmail so on

so,I need a global insert store procedure who belongs a parameter for any table name and any count of table field.

how can i develop this store procedure in sql server 2005 and obviously called from C#

any idea will be highly appreciate.
thanks in advance
Mahmud
Software Engineer

推荐答案

你好朋友

如您所愿,我将使用C#代码完成此操作,它将仅获取过程名称和参数数组,并用于所有insert,update,delete

如果有帮助的话..

请参阅此 SP [ ^ ]
Hello friend

as you asking i will done it using c# code, it will get only procedure name and parameter array and used for all insert,update,delete

if it will help you..

see this SP[^]


这篇关于无限参数化存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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