在我正在创建的程序中,我需要检索参数名称和参数的值类型以及值类型的长度.我需要从代码的不同部分获取的特定存储过程中检索参数. 我需要将所有参数名称,值类型和类型长度加载到datagridview中. datagridview已经有4列:参数名称,类型名称,长度和输入值. 输入值"列允许用户输入一个值,该值用于显示存储过程的结果 我正在使用SQL Server 2008和Visual Studio2010. 请帮助
in the program i am creating i need to retrieve the parameter name and value type of the parameter and length of the value type. i need to retrieve the parameters from a specific stored procedure that i have acquired in a different part of my code. i need to load all parameter names, value types and type lengths into a datagridview. the datagridview already has 4 columns: Parameter name, Type name, Length and Enter Value. The ''enter value'' column allows the user to enter a value to be used to display the results of the stored procedure i am using SQL Server 2008 and Visual Studio 2010. please help
推荐答案查看此处: www.mssqltips/sqlservertip/1669/generate-a-parameter-list-for-all-sql-server-stored-procedures -and-functions/ [ ^ ].这并不是您所需要的,但是稍作升级将有所帮助.您只需要过滤它并在您的应用程序中处理结果即可.它也可以在SQL 2008中使用. Look here: www.mssqltips/sqlservertip/1669/generate-a-parameter-list-for-all-sql-server-stored-procedures-and-functions/[^]. This is not exactly what you need, but a little upgrade will help. You just have to filter it and process the results in your application. It is working in SQL 2008 as well.
更多推荐
使用C#从存储过程中检索参数命名和值类型
发布评论