Solved

Problem with decimal number insert into Access DB

Posted on 2008-10-09
2
498 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 50

Accepted Solution

by:
Gustav Brock earned 250 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
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 …

689 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