Solved

Problem with decimal number insert into Access DB

Posted on 2008-10-09
2
486 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
2 Comments
 
LVL 49

Accepted Solution

by:
Gustav Brock earned 250 total points
Comment Utility
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
Comment Utility
Yes, that was it!
I used Double instead of Decimal
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now