Article View: borland.public.cppbuilder.database.ado
Article #1399Re: Arithmic error
From: James Peterson
Date: Thu, 08 Jul 2004 14:25
Date: Thu, 08 Jul 2004 14:25
46 lines
2497 bytes
2497 bytes
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:
<40ed58d5$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!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>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> Subject: Re: Arithmic error Date: Thu, 8 Jul 2004 09:25:20 -0500 Lines: 48 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: <40ed58d5$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1089296597 64.21.236.129 (8 Jul 2004 07:23:17 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail