Output parameters not readable when used with a DataReader

后端 未结 1 2019
既然无缘
既然无缘 2021-01-04 13:41

When using a DataReader object to access data from a database (such as SQL Server) through stored procedures, any output parameter added to the Command object b

相关标签:
1条回答
  • 2021-01-04 14:27

    This is due to the "by design" nature of DataReaders. Any parameters marked as ParameterDirection.Output won't be "filled" until the DataReader has been closed. While still open, all Output parameters will more than likely just come back null.

    The full Microsoft KB article concerning this can be viewed here.

    0 讨论(0)
提交回复
热议问题