How does the dataset designer determine the return type of a scalar query?

Posted by Tobias Funke on Stack Overflow See other posts from Stack Overflow or by Tobias Funke
Published on 2010-04-14T17:31:45Z Indexed on 2010/05/06 23:28 UTC
Read the original article Hit count: 140

Filed under:
|
|

I am attempting to add a scalar query to a dataset. The query is pretty straight forward, it's just adding up some decimal values in a few columns and returning them. I am 100% confident that only one row and one column is returned, and that it is of decimal type (SQL money type). The problem is that for some reason, the generated method (in the .designer.cs code file) is returning a value of type object, when it should be decimal. What's strange is that there's another scalar query that has the exact same SQL but is returning decimal like it should.

How does the dataset designer determine the data type, and how can I tell it to return decimal?

© Stack Overflow or respective owner

Related posts about dataset

Related posts about datasets