Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Arithmetic Overflow error

    I am getting the following error:
    Microsoft OLE DB Provider for SQL Server error 80040e57.
    Arithmetic overflow error converting numeric to data type numeric
    positionDisplay.asp line 21 ---- Here is line 21
    rsCountPos.open appCountSQL,conn,1,1,1

    The strange thing is that this just started after January 1st. On our site we get online job applications and there is also a way for us to go into an 'admin' area of our site to view the app details. We are getting this error only on applications submitted after Jan 1st. Everytime someone submits an application they receive a number. The number is the month, day, year, and then the number of the application received for that day. For example,
    app_id = 092120040005 - this would be the fifth application we received on 09/21/2004.

    I know practically nothing about SQL and this was kind of put in my lap. Please help! Point me in some direction.

  • #2
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,072
    Thanks
    4
    Thanked 8 Times in 8 Posts

    show more code

    Although that is the line pointed out in the error, the actual error is in the sql string. (appCountSQL) by what you are telling us, this looks like a mathematical operation so show all of the code leading up to this line.

  • #3
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The code is below. Thanks for your reply. Any help is appreciated.
    <!--#include file="../../include/connection.asp"-->

    <%
    function ShowPosDetails(app_ID)
    %>
    <div align="center">
    <center>
    <table width="672" border=1 style="border-collapse: collapse" bordercolor="#111111">
    <span class="genTxt">
    <%
    'app_id = "092120040005"

    appHistSql = "Select * from TN_APPL_EMP_HIST where app_id = '" & app_id & "'"
    'response.write appHistSQL
    ' response.close()
    set rsAppHist = Server.CreateObject("ADODB.Recordset")
    rsAppHist.open appHistSQL,Conn,1,1,1

    appCountSql = "Select Count(*) as cnt from TN_APPL_EMP_HIST where app_id =" & app_id
    set rsCountPos = Server.CreateObject("ADODB.Recordset")
    rsCountPos.open appCountSQL,conn,1,1,1

    appExtSql = "Select * from TN_APPL_EMP_EXT where app_id =" & app_id
    set rsAppExt = Server.CreateObject("ADODB.Recordset")
    ***line 21 rsAppExt.open AppExtSql,conn,1,1,1

    'response.write "ctr : " & ctr & "<BR>"
    'response.write "Ext_ctr : " & ext_ctr & "<BR>"
    'response.close()

  • #4
    Senior Coder
    Join Date
    Apr 2003
    Location
    England
    Posts
    1,192
    Thanks
    5
    Thanked 13 Times in 13 Posts
    does app_id have the same datatype in TN_APPL_EMP_EXT as TN_APPL_EMP_HIST ? .. im sorta just grasping at strings here but it sounds something like you are putting a long into an int or whatever so it needs to convert it but it doesnt fit in that datatype (but im probably wrong *shrugs*)

  • #5
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes, the app_id fields are both varchar (12) in both tables. There is also a connection include file at the top of the page. I can past the code of that page if I need to. It has to be related to the new year because it all started on january 1st. I can pull up applications that were submitted before the new year. So, can you or anyone else think of some piece of code (or parameter) that would break this after the new year of 2005. Any advice/help would be greatly appreciated!! Thanks for your reply.

  • #6
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,072
    Thanks
    4
    Thanked 8 Times in 8 Posts
    lets see the code that shows this function ShowPosDetails


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •