Open Forum

Expand all | Collapse all

SmartConnect error: Failed to convert parameter value from a string to a Int16

  • 1.  SmartConnect error: Failed to convert parameter value from a string to a Int16

    TOP CONTRIBUTOR
    Posted 22 days ago
    Greetings.

    I'm creating a SOP Return integration in SmartConnect.  When I run a test transaction I get the error: Failed to convert parameter value from a string to a Int16 on either the Customer ID or Customer Name depending on which is selected as the Index field.
    When I looked up the field in the eConnect documentation, it's defined as a string field.  So why would I get this error?
    Appreciate the help.

    Lou


    ------------------------------
    Lou Spevack
    American Council on Education
    Washington DC
    ------------------------------


  • 2.  RE: SmartConnect error: Failed to convert parameter value from a string to a Int16

    GPUG ALL STAR
    Posted 22 days ago
    Hi @Lou Spevack

    Is it really the customer ID that is causing the issue?  The shot above says it is the Key field of the integration, not necessarily the field causing the issue.

    Take a look at the data types for all of the fields you have mapped.

    You may need to convert one of the fields with a calculation to a different data type or control it in the ODBC Query and/or if is a text file then you can take a look at the schema it created and make sure all of the column data types are right in that.

    I see a lot of issues with Text files and not reading the data type of the column correctly.​

    ------------------------------

    ------------------------------



  • 3.  RE: SmartConnect error: Failed to convert parameter value from a string to a Int16

    Posted 22 days ago
    ​Hi Lou

    I would suspect that it is a field that you do not have mapped and it is sending in blank or empty string where an integer is required for this type of transaction.
    Check all of the destination fields that require an int16 you might just need a local constant in one of them.

    ------------------------------
    Todd Jeffrey
    Encore Business Solutions
    Winnipeg
    ------------------------------



  • 4.  RE: SmartConnect error: Failed to convert parameter value from a string to a Int16

    SILVER CONTRIBUTOR
    Posted 21 days ago
    Lou,
    I have run into this many times with Smartconnect over the years.  I have had to look at fields where you are passing a string to a field and unmap them one at a time until the error stops occurring so you know which is field is causing the problem.  Hopefully you are not working with a lot of fields but since this is a SOP Transaction I imagine you are.

    ------------------------------
    Donny Kensmoe
    Consultant
    Wipfli
    Green Bay WI
    ------------------------------



  • 5.  RE: SmartConnect error: Failed to convert parameter value from a string to a Int16

    TOP CONTRIBUTOR
    Posted 21 days ago
    Lou,

    My favorite way to troubleshoot this is to change your map to export to an XML file.  Then you can see all the values that are set and then compare them to the eConnect documentation.  Changing the export mode shouldn't affect your input mode or your mappings.

    Good luck.

    Chris

    ------------------------------
    Chris Donnelly
    Sr Mgr of Info Systems and Financial Reporting
    Healthmark Industries
    ------------------------------



If you've found this thread useful, dive deeper into User Group community content by role