TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
fientje_d
NA
3
0
Mapping between SqlDbType.double and SQLServer's money?
Oct 18 2004 4:09 AM
Hi all, I have a question concerning a strange behaviour that I noticed. From my C# code (.Net 1.0) I call a stored procedure that basically sums up a numeric database field of type money and returns the sum to my application. In the code, the parameter type is set to SqlDbType.double. For some reason, the database sum is rounded up when being passed back to the calling assembly. For example, if the sum on database equals 978.53, this suddenly becomes 979.00 for the code. When I change the parameter type to SqlDbType.Money in my code, it seems to work fine. When writing to database, SqlDbType.double in code and money type on SQLServer does not cause any rounding problems. Any idea what is causing this problem?
Reply
Answers (
1
)
Limiting Columns shown in a DataGrid?
how do i insert data to my sql db?