473,803 Members | 3,479 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Arithmetic overflow error converting numeric to data type numeric.

I'm getting this error:

Arithmetic overflow error converting numeric to data type numeric.

Triggered on this line of my code:
objOleDbAdapter .Fill(DS, "rss")

Everything works when this is pointed at one DB server (our staging server)
but when we point it at another DB server (our production server) I get the
error.

What would be causing this?

What's odd is that this was working previously. Could something on the DB
server itself becausing this?

-Darrel

Jul 19 '07 #1
4 7619

"darrel" <no*****@nowher e.comwrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
I'm getting this error:

Arithmetic overflow error converting numeric to data type numeric.
I think the problem is in the sql select statement used in OleDbAdapter
Jul 19 '07 #2
What's odd is that this was working previously. Could something on the DB
server itself becausing this?
We have two production servers (load balanced).

Initially, they both had this error. While I was trying to fix and test the
code on one of the two servers, the other one started working again.

So, I re-uploaded the same DLL file for our site and now one of our two
production servers runs fine, but the other is still giving me the
arithmetic error. Same code. Two different machines. Any ideas?

I'll be rebooting the bad one at the end of the day hoping that might fix
it.

-Darrel
Jul 19 '07 #3
I'll be rebooting the bad one at the end of the day hoping that might fix
it.
No reboot necessary. An hour later, they're working again. Any clues as to
what might be going on?

-Darrel
Jul 19 '07 #4
No reboot necessary. An hour later, they're working again. Any clues as to
what might be going on?
Well, I've narrowed it down to the DB server.

Regardless of the application server, if I query server 1, it works fine, if
I query server 2, it gives me the arithmetic error.

Same code. Same DLL. Just different conection string.

If I run the query directly in each DB, I get the exact same data.

I've checked the tables and all fields are the same datatype as well.

I'm completely stumped.

At this point, it sometimes works, and sometimes doesn't.

-Darrel
Jul 19 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1964
by: shank | last post by:
I got the following error: Arithmetic overflow error converting numeric to data type numeric I'm sure it was one of my currency fields. However, the real total of that column was $776.92 How did it get submitted as $776.9200000000001 ? Is there a way I can assure those extra digits get whacked? thanks!
4
310
by: Brian | last post by:
Does anyone know of any articles that discuss the best practice for choosing a numeric data type. I remember seeing a good article in the past, but can't remember where. I am interested in articles that give advice when you should choose a 'Single', 'Double' or 'Decimal' and why. I am trying to push the idea that decimals should not be used everywhere, but I need articles supporting that position.
4
25250
by: Saso Zagoranski | last post by:
Hi! I have created an SqlCommand object and I have set some parameters to it... One of the parameters is of the DateTime type; here is the code: sqlCommand.Parameters.Value = DateTime.Parse(this.DateTextBox.Text); sqlCommand.ExecuteNonReader(); I get the error:
1
10472
by: Mike P | last post by:
I am using a stored procedure to get a value from a table, but the parameter I need to pass is a numeric data type in the table. The SQL Parameter object in .NET seems to support most of the SQL Server data types, but not numeric. Can anybody tell me what data type I need to use? Any help would be really appreciated.
0
2424
by: rajmgopal | last post by:
Hello Everyone I am getting the following error when i try to insert a record into Sql Server 2005 from my VB 2005 application. sqlEx = {"Error converting data type numeric to numeric."} I checked for possible overflow exception, but did not encounter any. I have declared the values that i am trying to insert as DECIMAL data types in my VB code.
1
18862
by: sonata | last post by:
I am trying to compare two fields which are char data typr. BUT the comparision must be arithemetic in nature. so i tried to cast both the data base field and my parameter field to big int types which failed. I tried for Decimal type conversion and then comparision. It gave me the above error.
2
12664
by: Hulikal | last post by:
Hi, I using the following query select dateadd(s, 1185255439727, '01-01-1970 05:30:00') on MSSQL 2005. I get the error Arithmetic overflow error converting expression to data type int. If I use the query
3
2178
by: loisk | last post by:
Hi, Can anyone tell me.... What is the equivalent of "" (blank of string data type) with numeric data type? The default of my numeric data type control is 0, and I'd like trigger the event when a user delete the default and leave the control without making any entry. Thanks in advance!
0
1480
by: residual.interest | last post by:
I have found several sources stating that the numeric data type in SQL Server (without vardecimal options set) stores numbers of precision 10-19 in 9 bytes. Since 19 * ln(10) / ln(2) ~= 63.11 =65 bits with sign =9 bytes, I understand 9 bytes at this end of range. However, 10 * ln(10) / ln(2) ~= 33.22 =35 bits with sign =5 bytes. Why does SQL Server use the 'extra' 4 bytes? Is there an alignment requirement? If this is the reason, why...
0
9565
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10550
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10317
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10069
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9125
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7604
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5501
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3799
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2972
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.