data conversion - InfoPath Dev
in

InfoPath Dev

data conversion

Last post 03-19-2010 12:14 PM by brandon.gill. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 03-19-2010 10:05 AM

    data conversion

    I have a field in a form that is setup as a string type.  In my database the field is an nvarchar(max).  When the field is shredded to the database and contains numbers like 123457890 it works fine.  When I submit the numbers 7430500002 I get the message:

    The conversion of the nvarchar value '7430500002' overflowed an int column. Maximum integer value exceeded.

     This is odd because no data conversion should be taking place and why is the 10 number OK for 1234567890 and not 7430500002.

     Attached is a pdf with screen shots that show the DAT database mapping, IP text properties box and the SQL database table design.  This is just a generic filed no rules/data validation/code/etc attached.

  • 03-19-2010 10:19 AM In reply to

     Are you entirely sure that it's not the ledger column that's causing the overflow?  Is its value in any way related to the CCN field?

    The maximum value for an int is 2147483647, which explains why 1234567890 works and 7430500002 doesn't.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 03-19-2010 10:55 AM In reply to

    Yes, I am sure it is the CCN field.  I removed it from the mapping and the shredding/reshredding works fine.  If I remove the Ledger field the shred/reshred fails.  I changed the ledger from an int to a string and it still fails.  I deleted the field and added a new field with a new name, remapped it and it still fails.  I don't know why there would be a conversion of a string to an int happening on that field.

  • 03-19-2010 11:00 AM In reply to

    Do you have a trigger on the CCN field that writes the data to another table?

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 03-19-2010 11:04 AM In reply to

    Yes, on the SQL server I have a trigger, however, the data is never inserted into the table for the trigger to fire.

  • 03-19-2010 11:14 AM In reply to

     If the trigger fails, then the whole transaction will be rolled back and the insert will fail as a result.  Is the trigger attempting to use the CCN field value as an int in some way?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 03-19-2010 11:26 AM In reply to

    This is probably unrelated, but based on the attached PDF, you do not have a primary key defined on the table.  You have CORNO marked as the Key in mapping, so the table will need to be updated to define the primary key.

    Can you attach the content of the xml which is failing ?

     

  • 03-19-2010 12:14 PM In reply to

    It appears to be the trigger on the table.  If I disable the trigger then the shred is successful.  Thanks for you help!

Page 1 of 1 (8 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.