Ad
Output Parameters Not Readable When Used With A DataReader
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 before executing are not being filled after reading. I can read row data just fine, as well as all input parameters, but not output ones.
Ad
Answer
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.
Ad
source: stackoverflow.com
Related Questions
- → Function Undefined in Axios promise
- → React formatting dates with momentjs server side
- → Using ReactJs, How do I update my form fields when my parent object sent in from props changes?
- → Visual Studio 2012 Express: Browser returning 500 status trying to download jsx file
- → AngularJS directive: "templateUrl" doesn't work while "template" works
- → how to add cannonical tag for ASPX .NET page
- → Javascript Paypal slider string suffix
- → JavaScript in MVC 5 not being read?
- → Selecting an element by its attribute when it has a colon in its name
- → Function works for NON dynamically loaded images
- → URL routing requires /Home/Page?page=1 instead of /Home/Page/1
- → There are "gaps" between rows in my masonry cards
- → creating sef links and changing plus sign (+) with dash (-)
Ad