我试图将 proc 名称传递给 procedureNamePattern,并且该过程似乎返回了所有过程的所有元数据。我传入一个空字符串,得到相同的结果。
以下是使用的代码:
using (AdsCommand command = new AdsCommand { CommandText = "sp_getProcedureColumns",
Connection = connection,
CommandType = CommandType.StoredProcedure })
{
AdsParameter param = new AdsParameter("@procedureNamePattern", DbType.String) {
Direction = ParameterDirection.Input, Value = originalProcedureName };
command.Parameters.Add(param);
AdsParameter param0 = new AdsParameter("@catalog", DbType.String) {
Direction = ParameterDirection.Input, Value = null };
command.Parameters.Add(param0);
AdsParameter param1 = new AdsParameter("@schemaPattern", DbType.String) {
Direction = ParameterDirection.Input, Value = null };
command.Parameters.Add(param1);
AdsParameter param2 = new AdsParameter("@columnNamePattern", DbType.String) {
Direction = ParameterDirection.Input, Value = null };
command.Parameters.Add(param2);