web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Data Migration : SQL error description: [Microsoft][SQL Server Native Client 11.0][SQL Server]Conversion failed when converting the nvarchar value 'string' to data type int.

(0) ShareShare
ReportReport
Posted on by

Hi Everyone,

i faced the problem during copy data to target in Data migration

Somebody have faced this and fix before?

i had tried to resolved but still not fixed..

please share :'(

Thanks in advance :)

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    300,911 Super User 2025 Season 2 on at

    Hi,

    Can you please provide which feature you are using for data migration?  Is it Data Import/Export Framework, Test Data Transfer Tool or another?

  • Community Member Profile Picture
    on at

    Hi Andre,

    Thanks for your reply...

    i'm using ax2012 by calling from processing group...

    Thanks..

  • Community Member Profile Picture
    on at

    correction

    Is a Data Import/Export Framework..

  • Rony Cooremans Profile Picture
    2 on at

    can you please provide us with the concrete error message ? This helps us to better understand your problem

  • dekaasboer Profile Picture
    1,530 on at

    I assume that you are getting this error when you trie to fill the staging table?  Or when you trie to insert into AX?

    Have you validated our entity? Have you been able to preview your source without getting errors? It seems you trie to insert some date from your source into your staging. Or from staging into AX wich has a wrong format.

    You can find the DMF entity's in the AOT. Please verify that you are nog serving something like text into a data field.

  • Community Member Profile Picture
    on at

    Hi Rony,

    thanks ur reply..

    the error is :

    SQL error description: [Microsoft][SQL Server Native Client 11.0][SQL Server]Conversion failed when converting the nvarchar value 'String' to data type int.

    thanks..

  • Community Member Profile Picture
    on at

    Hi Rik Spoor,

    i getting error when tries to insert into AX...

    yes the item u mention was already done..also preview..

    because i take out the data in the same ax but different company..supposed the field is same right...

    just because this value from staging is string, but in target table is enum...however i was already convert it in new method in class DMMentityclass itself..is still error..

    could you please advise...

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    300,911 Super User 2025 Season 2 on at

    Hi,

    When creating the source mapping, did you had to manually link some fields?

    Try to edit the column names in the source, so they will match the field names in the staging table. Then the mapping might create internally another field type. I have had a similar issue before.

  • Community Member Profile Picture
    on at

    Hi Andre,

    Do i need to change logic in class also?

  • Community Member Profile Picture
    on at

    Hi Andre..

    I was followed your suggestion, however i faced the other error during import data to staging...

    'Error occurred while doing bulk copy from temp table to entity table-Violation of PRIMARY KEY constraint . Cannot insert duplicate key in object '

    Thanks,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans