?
Solved

Problem with decimal number insert into Access DB

Posted on 2008-10-09
2
Medium Priority
?
500 Views
Last Modified: 2013-11-26
Hi,
I'm trying to insert a value from TextBox into Access DB (Office 2007). This is a currency value (euro) with 4 decimal places.
A DB column is formated as Currency, ¬, 4 decimal places
A column in DataSet is formated as System.Decimal
Finally, a TextBox is binded to a DataSource and formated as Cyrrency (euro) with 4 decimal places (see attached image).
When I update a table adapter to the DB the value is rounded (31,2345 becomes 31,0000). I would like to preserve a value of all 4 decimal places.
If I edit this value in DB manualy, it compares correctly in software's form.
09-10-2008-21.23.00.jpg
09-10-2008-21.48.06.jpg
0
Comment
Question by:minjakon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 51

Accepted Solution

by:
Gustav Brock earned 1000 total points
ID: 22682621
The default count of decimals is zero:

http://msdn.microsoft.com/en-us/library/xtba3z33(VS.80).aspx

You may need to adjust that to four.

/gustav
0
 

Author Closing Comment

by:minjakon
ID: 31504798
Yes, that was it!
I used Double instead of Decimal
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question