Re: decimal precision
From: silenius (guillaume.defretiere_REMOVE_TOTO_at_irec.fr)
Date: 11/29/04
- Next message: Miha Markic [MVP C#]: "Re: DataUpdate passing wrong values to SqlServer?!?"
- Previous message: Hazira B: "create stored procedure dynamically"
- In reply to: Val Mazur: "Re: decimal precision"
- Next in thread: Val Mazur: "Re: decimal precision"
- Reply: Val Mazur: "Re: decimal precision"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 29 Nov 2004 10:06:16 +0100
thanks
but is there anyway to do using sqlcommandbuilder?
"Val Mazur" <group51a@hotmail.com> a écrit dans le message de
news:%23ucluzD1EHA.2608@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> This is a text from MSDN documentation
>
> ".NET Framework data providers that ship with .NET Framework version 1.0
do
> not verify the Precision or Scale of Decimal parameter values. This can
> result in truncated data being inserted at the data source.
> If you are using .NET Framework version 1.0, validate the Precision and
> Scale of Decimal values before setting the parameter value. When using
.NET
> Framework version 1.1 or later, an exception is thrown if
> a Decimal parameter value is set with an invalid Precision. Scale values
> that exceed the Decimal parameter scale are still truncated."
>
> So, when you create Command, which updates database from the dataset, you
> could specify precision of the parameter, using Precision and Scale
> properties of it.
>
> --
> Val Mazur
> Microsoft MVP
>
>
> "silenius" <guillaume.defretiere_REMOVE_TOTO@irec.fr> wrote in message
> news:OpJnUr70EHA.804@TK2MSFTNGP12.phx.gbl...
> >I got a problem
> >
> > when i transfer data form the dataset to the database, the decimal value
> > are
> > truncated and not rounded.
> > Is there a way to round them automaticly. if not, how can i retrieve the
> > precision of the decimal in the database in dot.net to do the rounding
> > before?
> >
> > thanks
> >
> >
>
>
- Next message: Miha Markic [MVP C#]: "Re: DataUpdate passing wrong values to SqlServer?!?"
- Previous message: Hazira B: "create stored procedure dynamically"
- In reply to: Val Mazur: "Re: decimal precision"
- Next in thread: Val Mazur: "Re: decimal precision"
- Reply: Val Mazur: "Re: decimal precision"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|