C# 校准失败了
我得到了下面的代码作为字符串返回。但是,输出返回的是一个凌乱的代码,所有对齐都已取消。是否仍要将存储过程作为原始编码返回C# 校准失败了,c#,stored-procedures,teradata,C#,Stored Procedures,Teradata,我得到了下面的代码作为字符串返回。但是,输出返回的是一个凌乱的代码,所有对齐都已取消。是否仍要将存储过程作为原始编码返回 command = "SHOW PROCEDURE Inventory.pr_demand_curr()" using (TdConnection cn = new TdConnection(connectionString)) { cn.Open(); TdCommand cmd = cn.CreateCom
command = "SHOW PROCEDURE Inventory.pr_demand_curr()"
using (TdConnection cn = new TdConnection(connectionString))
{
cn.Open();
TdCommand cmd = cn.CreateCommand();
cmd.CommandText = command;
reader = cmd.ExecuteReader();
while (reader.Read())
{
output += reader.GetString(0);
}
}
return output;
我想知道cmd.CommandType=System.Data.CommandType.StoredProcess;你能解决这个问题吗?我试图在CreateCommand()下面添加此内容,但查询失败,因为executeReader()无法读取show store过程。列中的数据是什么格式的?例如,是否需要在每个GetString()之后添加新行?