net中统一的存储过程调用方法 1
点击次数:30 次 发布日期:2008-11-26 10:45:38 作者:源代码网
|
源代码网推荐 源代码网推荐 关键字:存储过程、系统表、信息结构视图、ADO.NET 文献标识码:②实用性技术成果报告(科技)、理论学习与社会实践总结(社科) 源代码网推荐 源代码网推荐 源代码网推荐 Call stored procedures in a same way in .NET 源代码网推荐 Abstract: Using stored procedures is a good habit in developing projects. It provides temporary table, functions and cursors, and debugging, upgrading, maintainence can benefit from it too. However, almost all calling to a stored procedure is a same pattern, the main difference between them is the parameters of every stored procedure. Then, can we call stored procedure in a same way in spite of their differences and reduce the programming code. We did it after studying SQL Server and .NET. Only information you provide is the stored procedure name and the values of its parameters, you needn’t to create the parameters yourself. Key word: Stord Procedure, System table, Information Schema, ADO.NET 源代码网推荐 源代码网推荐 摘要:在一个项目的开发中,经常会调用数据库中的存储过程。可是,几乎所有存储过程的调用都是同一个模式,主要区别就在于创建的每个参数类型、值等不一样。那么,能不能实现通过一个函数(或者类)调用所有的存储过程呢?本文在利用数据库提供的系统表原理上,实现了统一调用的方法,该方法只需要提供要调用的存储过程名,以及调用时提供具体的参数值就可实现任何存储过程的调用。 源代码网推荐 源代码网推荐 Abstract: We have to call stored procedures of database systems during a development of a project. However, calling a stored procedures are almost the same, the main difference is the difference between parameters’ type or value etc. Can we call any stored procedures through a functio 源代码网推荐 源代码网推荐 源代码网推荐 做人要厚道,请注明转自酷网动力(www.ASPCOOL.COM)。 源代码网推荐 源代码网供稿. |
