Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
ASP .Net
SqlDataReader showing Empty columns until after error.
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Marina Levit [MVP], post: 1984484"] You know, I read your message several times, and I couldn't see the error message as it was burried in with a whole bunch of other stuff. Sorry I missed it, but it was very hard to spot and didn't stand out. I think the issue is - what value does the column have at the moment? All that means, is that whatever it is, it cannot be converted into an integer. It doesn't mean it's empty - how do you define empty anyway? It's not DBNull, since you are checking for that. A numeric can only have a value of DBNull or a number - so it looks to me like your stored procedure is returning a non-numeric data type for that column. Perhaps it is returning a string - or the empty string, don't know. Maybe it's not an integer and has decimal places, and so the conversion is failing somehow? You should try retrieving the value of this column and see exactly what it is. Try calling GetFieldType on the datareader for that column to see which datatype that column is. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
ASP .Net
SqlDataReader showing Empty columns until after error.
Top