List:MySQL and .NET« Previous MessageNext Message »
From:Reggie Burnett Date:January 13 2005 1:14pm
Subject:RE: question
View as plain text  
Shawn

Good followup.  

Jorge, the thing to keep in mind is that the command line client is a UI.
It may choose to display decimal values using the precision and scale.
Connector/Net just gives you the value of the column and, using the
metadata,  you can get access to the precision and scale of the column.
Then you can display it anyway you wish.

-reggie

> -----Original Message-----
> From: SGreen@stripped [mailto:SGreen@stripped]
> Sent: Wednesday, January 12, 2005 9:09 AM
> To: Jorge Bastos
> Cc: dotnet@stripped
> Subject: Re: question
> 
> Even in the command-line mysql client there is a conversion of the
> internal decimal format to something character based (string) so that you,
> the user, can see the value in a way you understand it. How each front-end
> (MySQL client, VB , ASP, PHP, etc) converts an internally numeric value
> into a recognizable representation is unique to each front-end.
> 
> I agree with the previous comment, it's a formatting issue at the time of
> display not a transport or a storage issue.
> 
> I believe that the regional settings affect (among other things) whether
> you use a comma or a period to represent the decimal point, not if you see
> trailing zeros on a decimal value with no fractional component. The option
> to show trailing zeros is in a different part of the user interface.
> 
> Shawn Green
> Database Administrator
> Unimin Corporation - Spruce Pine
> 
> "Jorge Bastos" <mysql.jorge@stripped> wrote on 01/12/2005 09:37:39 AM:
> 
> > i'm not saying that is mysql, but the driver, if i do a select in a
> command
> > line i get the 0.00, like this.
> >
> > select taxa_empregado,taxa_empresa from tab_ssocial01;
> >
> > +----------------+--------------+
> > | taxa_empregado | taxa_empresa |
> > +----------------+--------------+
> > |         10.100 |       10.000 |
> > |          0.001 |        0.000 |
> > +----------------+--------------+
> > 2 rows in set (0.00 sec)
> >
> >
> >
> >
> >
> > ----- Original Message -----
> > From: "Patrick Questembert" <patrickq@stripped>
> > To: "Jorge Bastos" <mysql.jorge@stripped>;
> <dotnet@stripped>
> > Sent: Wednesday, January 12, 2005 1:10 PM
> > Subject: RE: question
> >
> >
> > > If you want to treat the value as decimal, then 0.00 is plain 0 and
> then
> > > it's up to your application to display it any way it wants and has
> nothing
> > > to do with MySQL. I think MySQL is storing decimal values as text in
> the
> > > tables but that's only an internal representation issue.
> > >
> > > -----Original Message-----
> > > From: Jorge Bastos [mailto:mysql.jorge@stripped]
> > > Sent: Wednesday, January 12, 2005 6:58 AM
> > > To: dotnet@stripped
> > > Subject: question
> > >
> > >
> > > DecimalReggie, this is not a problem, maybe just a dumb question from
> me.
> > >
> > > When having a decimal field with "0.00", in the vb ide i get only "0",
> > > shouldn't i get the "0.00" ?
> > > Or it has anything to do with the regional settings?
> > >
> > > Jorge Bastos
> > >
> > >
> >
> >
> > --
> > MySQL on .NET Mailing List
> > For list archives: http://lists.mysql.com/dotnet
> > To unsubscribe:    http://lists.mysql.com/dotnet?unsub=1
> >

Thread
questionJorge Bastos12 Jan
  • RE: questionPatrick Questembert12 Jan
    • Re: questionJorge Bastos12 Jan
      • Re: questionSGreen12 Jan
        • RE: questionReggie Burnett13 Jan