HighTechTalks DotNet Forums  

Storing decimals to Pervasive SQL database

Dotnet Framework (ADO.net) microsoft.public.dotnet.framework.adonet


Discuss Storing decimals to Pervasive SQL database in the Dotnet Framework (ADO.net) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Hans van de Laar
 
Posts: n/a

Default Storing decimals to Pervasive SQL database - 09-10-2007 , 05:38 AM






Within an VB.net application I'm trying to store decimal values to a
Pervasive SQL table. The decimal values comes from a xml file and is
looking something like:
<Grade1>6.65</Grade1>
<Grade2>6.66</Grade2>
<Grade3>6.0</Grade3>

When I look for the results in the database I find 665, 666 and 60 for
the corresponding columns. All types are setup as decimals. What I'm I
doing wrong?

Regards,
Hans

Reply With Quote
  #2  
Old   
PvdG42
 
Posts: n/a

Default Re: Storing decimals to Pervasive SQL database - 09-10-2007 , 07:28 AM






"Hans van de Laar" <hansvandelaar.replace.at.micros.nl> wrote

Quote:
Within an VB.net application I'm trying to store decimal values to a
Pervasive SQL table. The decimal values comes from a xml file and is
looking something like:
Grade1>6.65</Grade1
Grade2>6.66</Grade2
Grade3>6.0</Grade3

When I look for the results in the database I find 665, 666 and 60 for
the corresponding columns. All types are setup as decimals. What I'm I
doing wrong?

Regards,
Hans

It appears that Pervasive doesn't understand .NET System.Decimal. I'd ask
Pervasive tech support:

http://ww2.pervasive.com/Pages/Products.aspx (click the Support tab).




Reply With Quote
  #3  
Old   
Patrice
 
Posts: n/a

Default Re: Storing decimals to Pervasive SQL database - 09-10-2007 , 07:32 AM



It could be also a conversino problme issue. For example if you convert
those value with . as the thousand separator, it's likely you'll get the
same result (i.e. the point is dropped and it left you with 665, 666 and
60).

I would check where you convert text values to decimals and would check the
cultutre that you are currently using.

--
Patrice

"PvdG42" <pvdg (AT) toadstool (DOT) edu> a écrit dans le message de news:
uO6E8258HHA.536 (AT) TK2MSFTNGP06 (DOT) phx.gbl...
Quote:
"Hans van de Laar" <hansvandelaar.replace.at.micros.nl> wrote in message
news:xn0fb168dwxw3000 (AT) msnews (DOT) microsoft.com...
Within an VB.net application I'm trying to store decimal values to a
Pervasive SQL table. The decimal values comes from a xml file and is
looking something like:
Grade1>6.65</Grade1
Grade2>6.66</Grade2
Grade3>6.0</Grade3

When I look for the results in the database I find 665, 666 and 60 for
the corresponding columns. All types are setup as decimals. What I'm I
doing wrong?

Regards,
Hans


It appears that Pervasive doesn't understand .NET System.Decimal. I'd ask
Pervasive tech support:

http://ww2.pervasive.com/Pages/Products.aspx (click the Support tab).





Reply With Quote
  #4  
Old   
Hans van de Laar
 
Posts: n/a

Default Re: Storing decimals to Pervasive SQL database - 09-10-2007 , 07:42 AM



Patrice,

Thanks, it seems indeed a culture info problem. I programmatically
changed the culture to "n-US" and I noticed the values are now stored
correctly into the database.

Thanks,
Hans

Patrice wrote:

Quote:
It could be also a conversino problme issue. For example if you
convert those value with . as the thousand separator, it's likely
you'll get the same result (i.e. the point is dropped and it left you
with 665, 666 and 60).

I would check where you convert text values to decimals and would
check the cultutre that you are currently using.

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.