Article View: borland.public.cppbuilder.database.ado
Article #1398Re: Arithmic error
From: Viatcheslav V. Vassiliev
Date: Thu, 08 Jul 2004 14:07
Date: Thu, 08 Jul 2004 14:07
39 lines
2196 bytes
2196 bytes
Write numeric as integer, not as string - 182, not '182'. What is your DBMS?
//------------------------------------------
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:
<40ed5516$2@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>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,334e5cafbfb3ec2c X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com> Newsgroups: borland.public.cppbuilder.database.ado References: <40ed4c75$1@newsgroups.borland.com> Subject: Re: Arithmic error Date: Thu, 8 Jul 2004 18:07:22 +0400 Lines: 41 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 213.234.218.42 Message-ID: <40ed5516$2@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1089295638 213.234.218.42 (8 Jul 2004 07:07:18 -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