Yes that is the right place to get the latest source code. I think you're on the right track, I'll check the patch more thoroughly and integrate it with the trunk version.
On Mon, Mar 21, 2011 at 8:54 PM, Kristoffer Jansson < [email protected]> wrote: > > Have you tried this with latest build of JetDriver? > > I checked out the latest revision from > https://nhcontrib.svn.sourceforge.net/svnroot/nhcontrib/trunk. > Is that the correct one? > > > By the way, current test suite uses an actual Jet database to run an > automated test so writing one would be pretty simple. > > You're right. I took the liberty to write one: > http://www.itstod.se/files/decimaltest.patch > > I'm not sure if it's ok to call: > > public JetCommandFixture() : base(true) { } > > But I didn't know how to create the table otherwise :) > > // Kristoffer > > On Mar 21, 5:25 pm, Hadi Eskandari <[email protected]> wrote: > > Have you tried this with latest build of JetDriver? I'll take a closer > look > > on your patch and integrate if that fixes the problem you mentioned. By > the > > way, current test suite uses an actual Jet database to run an automated > test > > so writing one would be pretty simple. > > > > Thanks for reporting this and sending in the patch. > > > > On Mon, Mar 21, 2011 at 7:12 PM, Kristoffer Jansson < > > > > > > > > > > > > > > > > [email protected]> wrote: > > > I ran into a problem with the JetDriver and decimals a while ago when > > > working with MS Access databases, but I have no idea how to > > > contribute, so I'll just post it here. > > > > > The problem arises when you're trying to save a value of type decimal > > > in the database. Regardless of whether the designated column is a > > > double, or an actual decimal doesn't seem to matter. What happens is > > > that the decimal separator magically disappears. So saving '1.2' would > > > result in the value '12' in the database. > > > > > The fix is making decimals into doubles before saving to database. > > > Similar as to how the code already makes Int64 into Int32. This works > > > on both double and decimal columns. > > > > > I've no idea how to write an automated test to verify this, except > > > actually having a database lying around and try to store and read back > > > the data. Even then I'm not sure if the test could be used safely as > > > it's not very isolated. There may be some twisted environment of > > > drivers etc where the error wouldn't show up. > > > > > Anyway, I've seen this exact behavior on our systems as well as > > > customers, so it doesn't seem like it's only me :) > > > > > Here's a patch that fixes the problem: > > >http://www.itstod.se/files/jetdriver_decimal_to_double_fix.patch > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "NHibernate Contrib - Development Group" group. > > > To post to this group, send email to [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]. > > > For more options, visit this group at > > >http://groups.google.com/group/nhcdevs?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "NHibernate Contrib - Development Group" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/nhcdevs?hl=en. > > -- You received this message because you are subscribed to the Google Groups "NHibernate Contrib - Development Group" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhcdevs?hl=en.
