Re: decimal precision

From: silenius (guillaume.defretiere_REMOVE_TOTO_at_irec.fr)
Date: 11/29/04


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
> >
> >
>
>



Relevant Pages

  • Re: decimal precision
    ... >> not verify the Precision or Scale of Decimal parameter values. ... >> So, when you create Command, which updates database from the dataset, you ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Decimal Data Type losing scale?
    ... Is it possible that you've failed to specify precision and scale ... a decimal parameter is precision 18, ... >I CAN TYPE the pennies into the record in the table with Enterprise Mgr. ...
    (microsoft.public.sqlserver.programming)
  • Re: decimal precision
    ... ".NET Framework data providers that ship with .NET Framework version 1.0 do ... not verify the Precision or Scale of Decimal parameter values. ... Scale of Decimal values before setting the parameter value. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: How to use VBA to update a SQL Server Table from a Spreadsheet
    ... Rubble wrote: ... database it all showed up as "0's". ... Precision and Scale are terms that can be somewhat confusing IMO. ...
    (microsoft.public.excel.programming)
  • Re: new here, my lang project... PT2
    ... The scale is limited by the resolution of ... I see this as a precision vs. accuracy issue. ... > physics core ... > just I am not sure how necessary the partitioning is at present. ...
    (comp.object)