1
10
我想你应该能用 sqldatareader.getSchemaTable表 访问架构的方法。 更多信息可以在这里找到。 http://support.microsoft.com/kb/310107 来自上述来源的示例
|
2
1
我认为你所做的可能是最好的方法。实际上,没有一个神奇的存储库能够保存所有这些信息。您可以从系统目录视图中找到有关存储过程参数的信息,但是结果集的形状、字段名和类型并没有存储在SQL Server系统视图中的任何位置,很遗憾。 |
3
1
另一个选项(根据需要,可能比getSchemaTable()更好或更差)。
|
4
0
如果这是一次您需要做的事情,而不是每次调用过程时在运行时都要做的事情,那么只需修改结果集查询,以便使用
运行应用程序或手动调用过程以生成throwaraytable。现在,您可以使用任何方法、ssms或information-schema.columns查找列aames和数据类型。
只需记住将程序改回(删除
|
Duvan · 将逗号(,)替换为点(.)[副本] 2 年前 |
Mateen Bagheri · 选择表的计数并选择其自身 2 年前 |
SoT · SQL Server中求和函数的工作方式 2 年前 |
NKAT · 将列值聚合到列表中会产生错误 2 年前 |
deanpillow · 返回两列中有一个匹配值的记录 2 年前 |
snowflakes74 · 在Dapper中异步查询多个结果 2 年前 |