Link to home
Start Free TrialLog in
Avatar of Jorge Paulino
Jorge PaulinoFlag for Portugal

asked on

Arithmetic overflow error for data type smallint

Hi received this message from a cliente. Don't know what is but can anyone help me with some idea (what to do in the place).

2007-09-10 10:05:59 - Rollback (PFUpdateDB)
2007-09-10 10:05:59 - SQLServer Error Keeping message (PFUpdateDB)
2007-09-10 10:05:59 - Failed to update database. (PFUpdateDB)
2007-09-10 10:05:59 - Error executing qryAddResult: Arithmetic overflow error for data type smallint, value = 1224755456[#13][#10]Data:[#13][#10]101I0[#29]103I0[#29]104I18688[#29]105I18688[#29]106I18688[#29]107I1224755456[#29]108I21512210[#29]109I2[#29]111I0[#29]118I0[#29]121I0[#29]123I0[#29]300I1224755456[#29]301S2008-10-23[#29]302S09:50:56[#29]303SI[#29]304S[#29]305S1224755456[#29]310I0[#29]311I0[#29]312I18688[#29]313I18688[#29]314I1224755456[#29]315SELECTROS[#29]316S[#29]319I18688[#29]322I0[#29]330I99[#29]340I0[#29]341I73[#29]993I1[#29]997S10.21.40.193[#29]995I1[#29] (PFUpdateDB).

Thanks
jpaulino
ASKER CERTIFIED SOLUTION
Avatar of twoboats
twoboats

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of twoboats
twoboats

And looks like it's happening in a procedure called

PFUpdateDB

And the value that's too big is

value = 1224755456

BOL
"Use the smallint data type to store numbers in the range from -32,768 through 32,767 "

So hunt down all the smallints that the proc references.
Avatar of Jorge Paulino

ASKER

That is my suspect too!

But maybe changing the type of the table where the stored procedure writes it solve the problem.
Posting the sp should help...
Simplest solution is to look for all smallints and replace them with integers.
I will try latter.

Thanks
Hi twoboats,

The SQL didn't have any stored procedure and the information I have post it is from the application (error log). So I had only one solution  change the table data type from smallint to int and it solve. This in information from equipments and due to an error it sends wrong information.

Thanks again for the help.

jpaulino

No prob. Glad it's sorted