Re: [Firebird-net-provider] I've got decimal issues with other cultures and need help

2008-04-07 Thread Dean Harding
Rolf Marsh wrote: > CultureInfo ci = CultureInfo.CurrentCulture; > NumberFormatInfo nfi = ci.NumberFormat; > decimal decPrice, decCost; > > decPrice = decimal.Parse(pricePieces[0]); // pricePieces is a string > array where I remove trailing currency sign There are two problems here. This w

Re: [Firebird-net-provider] I've got decimal issues with other cultures and need help

2008-04-07 Thread Jiri Cincura
On 4/7/08, Rolf Marsh <[EMAIL PROTECTED]> wrote: > Also, can you point me to a doc that shows how to use parameters when > building a query? I've always done it this way, not knowing whether it was > right or wrong. Look at FbCommand.Parameters collection. Or just DbParameterCollection in MSDN.

Re: [Firebird-net-provider] I've got decimal issues with other cultures and need help

2008-04-07 Thread Rolf Marsh
When I try to convert the string to decimal using a >.< and the culture is non-US, I get a "string not in correct format" error. Code is: CultureInfo ci = CultureInfo.CurrentCulture; NumberFormatInfo nfi = ci.NumberFormat; decimal decPrice, decCost; s

Re: [Firebird-net-provider] I've got decimal issues with other cultures and need help

2008-04-07 Thread Jiri Cincura
On 4/7/08, Rolf Marsh <[EMAIL PROTECTED]> wrote: > string fbInsertString = "insert into tBooks values ('" + > BookNbr + "', '" + > Title.ToString().Replace("'", "''") + "', '" + > Author.ToString().Replace("'", "''") + "', '" + > ISBN + "', '" + > Illus + "', '" + // > Locn + "', '"

Re: [Firebird-net-provider] I've got decimal issues with other cultures and need help

2008-04-07 Thread Rolf Marsh
Jiri Cincura wrote: > Can you show us piece of code? > > CultureInfo ci = CultureInfo.CurrentCulture; NumberFormatInfo nfi = ci.NumberFormat; decimal decPrice, decCost; decPrice = decimal.Parse(pricePieces[0]); // pricePieces is a string array where I remove trailing currency sign st

Re: [Firebird-net-provider] I've got decimal issues with other

2008-04-07 Thread Jiri Cincura
On 4/7/08, YAMACO Software <[EMAIL PROTECTED]> wrote: > I am afraid But I do not have a source code for .NET assembly. As I said > it was supplied by another vendor. > So ask vendor. When they found a bug, they can report it to here. -- Jiri {x2} Cincura (CTO x2develop.com) http://blog.vyvojar.

Re: [Firebird-net-provider] I've got decimal issues with other

2008-04-07 Thread YAMACO Software
developers of the Firebird .NET providers > Subject: Re: [Firebird-net-provider] I've got decimal issues > with other > > > Can you show us piece of code? > > -- > Jiri {x2} Cincura (CTO x2develop.com) > http://

Re: [Firebird-net-provider] I've got decimal issues with other cultures and need help

2008-04-07 Thread Jiri Cincura
Can you show us piece of code? -- Jiri {x2} Cincura (CTO x2develop.com) http://blog.vyvojar.cz/jirka/ | http://www.ID3renamer.com - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Register now and save $20

[Firebird-net-provider] I've got decimal issues with other cultures and need help

2008-04-06 Thread Rolf Marsh
Hello... I have a C# program that takes a currency (decimal 10,2) amount and stores it in a table. With the culture "EN_us", everything works fine: 7.99 appears in the table as 7.99. Now, if I change the culture to Finland (whose currency uses a comma as the decimal separator), I see that 7,9