使用C#从存储过程中检索参数命名和值类型

编程入门 行业动态 更新时间:2024-10-21 13:22:12
本文介绍了使用C#从存储过程中检索参数命名和值类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在我正在创建的程序中,我需要检索参数名称和参数的值类型以及值类型的长度.我需要从代码的不同部分获取的特定存储过程中检索参数. 我需要将所有参数名称,值类型和类型长度加载到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#从存储过程中检索参数命名和值类型

本文发布于:2023-10-27 03:18:04,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1532155.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:过程中   参数   类型

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!