[英]Analyze data returned from SQL Server stored procedure
Sorry if this is a simple question. 对不起,如果这是一个简单的问题。 I have been given a stored procedure which is quite long and complex and this is returning a DataSet in ac# page.
我得到了一个很长很复杂的存储过程,这是在ac#page中返回一个DataSet。 When investigating ds.Tables[0].Rows[0].ItemArray, the array is full but I'm not sure which item is which in the array.
在调查ds.Tables [0] .Rows [0] .ItemArray时,数组已满,但是我不确定该数组中的哪个项目。 Is there any efficient way how I may investigate the items which are being filled into the array and which parameter each is (eg name, noProducts, price, etc)?
有什么有效的方法可以调查填充到数组中的项以及每个项是哪个参数(例如,名称,noProducts,价格等)?
Thanks 谢谢
First look at the Columns ( Tables[0].Columns
) collection, that represents the columns that returned from your stored procedure. 首先查看Columns(
Tables[0].Columns
)集合,它表示从存储过程返回的列。 Then use this column names to get exact values ( Tables[0].Rows[0]["ColumnName"]
). 然后使用此列名称获取确切值(
Tables[0].Rows[0]["ColumnName"]
)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.