Article View: borland.public.cppbuilder.database.ado
Article #1404Re: Arithmic error
From: James Peterson
Date: Thu, 08 Jul 2004 18:11
Date: Thu, 08 Jul 2004 18:11
88 lines
4458 bytes
4458 bytes
DOH, that is what my problem was, I am use to paradox, the decimal (x,y)
definitions are slightly differant and I didn't even notice that fact. Thanx
Vas. you saved my week and some hair pulling.
"Viatcheslav V. Vassiliev" <support@oledbdirect.com> wrote in message
news:40ed8580$1@newsgroups.borland.com...
> Really, it (MS SQL Server) is right. CupWeight numeric(6,4) is 6 digits
> number and 4 of them are on the right of decimal point, so only 2 digits
> before decimal point. 100 is overflow, 99 is not.
>
> > out of curriosity, does MS SQL require you to insert NULLs on all feilds
> in
> > a table if you do an insert into only on certain ones?
> No, identity column is autogenerated.
>
> file://------------------------------------------
> Regards,
> Vassiliev V. V.
> http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
> ADO.Net
> http://www.oledbdirect.com - The fastest way to access MS SQL Server,
> MS Jet (Access) and Interbase (through OLEDB)
>
> "James Peterson" <jpeterson@romanmealmilling.com> �������/�������� �
> �������� ���������: news:40ed62a6@newsgroups.borland.com...
> > out of curriosity, does MS SQL require you to insert NULLs on all feilds
> in
> > a table if you do an insert into only on certain ones?
> > "James Peterson" <jpeterson@romanmealmilling.com> wrote in message
> > news:40ed58d5$1@newsgroups.borland.com...
> > > I have done it 182 and '182' and same error. and its MS SQL 2000
> > >
> > > "Viatcheslav V. Vassiliev" <support@oledbdirect.com> wrote in message
> > > news:40ed5516$2@newsgroups.borland.com...
> > > > Write numeric as integer, not as string - 182, not '182'. What is
your
> > > DBMS?
> > > >
> > > > file://------------------------------------------
> > > > Regards,
> > > > Vassiliev V. V.
> > > > http://www.managed-vcl.com - using .Net objects in Delphi for Win32
+
> > > > ADO.Net
> > > > http://www.oledbdirect.com - The fastest way to access MS SQL
Server,
> > > > MS Jet (Access) and Interbase (through OLEDB)
> > > >
> > > > "James Peterson" <jpeterson@romanmealmilling.com> �������/�������� �
> > > > �������� ���������: news:40ed4c75$1@newsgroups.borland.com...
> > > > > I am getting the following error when I do an insert into.
> > > > > Arithmetic overflow error converting numeric to data type numeric
> > > > >
> > > > > my table is set up like this
> > > > > Create Table data(
> > > > > RecNumber int IDENTITY(1,1),
> > > > > ItemNumber char(30),
> > > > > CupWeight numeric(6,4),
> > > > > Primary key(RecNumber))
> > > > >
> > > > > and my insert is the following
> > > > >
> > > > > instert into data(ItemNumber, CupWeight)values('itemnumber','182')
> > > > >
> > > > > if I just insert the item number it works fine but when I add the
> > > > cupweight
> > > > > I get the error. I have been doing some searches on the web but
they
> > all
> > > > say
> > > > > you get that error when you pass a value to large for the field.
But
> > as
> > > > you
> > > > > can see in this case my number I am passing into cupweight is not
> > > > exceeding
> > > > > the limits of the feild.
> > > > >
> > > > > any help would be greatfull.
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Technical Details
Message-ID:
<40ed8dcc$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40ed4c75$1@newsgroups.borland.com> <40ed5516$2@newsgroups.borland.com> <40ed58d5$1@newsgroups.borland.com> <40ed62a6@newsgroups.borland.com> <40ed8580$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,334e5cafbfb3ec2c X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII From: "James Peterson" <jpeterson@romanmealmilling.com> Newsgroups: borland.public.cppbuilder.database.ado References: <40ed4c75$1@newsgroups.borland.com> <40ed5516$2@newsgroups.borland.com> <40ed58d5$1@newsgroups.borland.com> <40ed62a6@newsgroups.borland.com> <40ed8580$1@newsgroups.borland.com> Subject: Re: Arithmic error Date: Thu, 8 Jul 2004 13:11:20 -0500 Lines: 90 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 NNTP-Posting-Host: 64.21.236.129 Message-ID: <40ed8dcc$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1089310156 64.21.236.129 (8 Jul 2004 11:09:16 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail