Re: decimal precision

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Val Mazur (group51a_at_hotmail.com)
Date: 11/30/04


Date: Mon, 29 Nov 2004 23:58:46 -0500

Hi,

When you use CommandBuilder it should do it automatically. If it does not do
it, then you could try to access specific command (Insert/Update/Delete) and
try to modify parameter there

-- 
Val Mazur
Microsoft MVP
http://xport.mvps.org
"silenius" <guillaume.defretiere_REMOVE_TOTO@irec.fr> wrote in message 
news:%23J1$HLf1EHA.2608@TK2MSFTNGP14.phx.gbl...
> 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: 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)
  • Re: float storage
    ... To increase the scale one must decrease the precision. ... SQL> create table numberz, ...
    (comp.databases.oracle.misc)