Re: decimal precision
From: Val Mazur (group51a_at_hotmail.com)
Date: 11/30/04
- Next message: Val Mazur: "Re: DataAdapter.Fill & case sensitivity"
- Previous message: W.G. Ryan eMVP: "Re: Moving more than one record in datareader"
- In reply to: silenius: "Re: decimal precision"
- Messages sorted by: [ date ] [ thread ]
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 >> > >> > >> >> > >
- Next message: Val Mazur: "Re: DataAdapter.Fill & case sensitivity"
- Previous message: W.G. Ryan eMVP: "Re: Moving more than one record in datareader"
- In reply to: silenius: "Re: decimal precision"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|