-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't save decimal value #32
Comments
I checked your code using 2.2.0 stable. I ported the code to a test case (Model79_CantSaveDecimalValue). You can find the test case in the repository.
|
I have the same mistake. I think it’s a problem of the language. In a german Accessdb it don’t work. |
Hello Bubibubi, I need to work on some older application that uses .mdb files, so I need to use "Microsoft.Jet.OLEDB.4.0" OleDbDefaultProvider. I do not want to install the Microsoft.ACE.OLEDB driver on client computers. I am currently trying not to use decimal fields. I use float fields instead. I tested the record addition directly through OleDb and the same problem occurred in every "Microsoft.Jet.OLEDB.4.0" and "Microsoft.ACE.OLEDB.12.0" driver. My CultrueInfo is "pl-PL". Setting the CultrueInfo parameter to "en-US" at startup does not help. If I change the region format in the System Control Panel to "English (United States)", then adding a record with the Deciaml value works correctly through OleDb and through EntityFramework. There may be a bug in these OleDb drivers when they are used in a country where the decimal point is a comma instead of a dot. My test function:
|
I think that the problem is not related only to decimal point. With system set in it-IT (so the comma separates decimal values and the dot separate thousands) everything's working fine. EDIT EDIT |
Yes, with the Region set in the System Control Panel to "Polish (Poland)" I get the same error message all the time. I checked other Regions: I noticed that when in "Polish (Poland)" region I set the "Digit grouping symbol" to "dot", then decimal value writing works. I also checked the use of "space" in other Regions, where "dot" is the default: Only in the "Polish (Polish)" region "space" as a "Digit grouping symbol" does not work. I checked it on various virtual machines with freshly installed systems:
The same results were found in these systems. The solution to the problem may be setting a "dot" in the System Control Panel as a "Digit grouping symbol" for "Polish (Poland)" region. |
There is a StackOverflow answer about this issue. We might be able to get around this issue by emitting the decimal value to SQL using the current culture settings. OleDb should then convert it back to the invariant culture. |
Is it possible to save a decimal value?
There is an "Inappropriate data type in the criterion expression" with HResult 0x80040E07 from "Microsoft JET Database Engine".
The text was updated successfully, but these errors were encountered: