Question Status

Suggested Answer
ochoch asked a question on 16 Jul 2013 9:10 AM

Hello,

I am using DMF to migrate data from AX2009 to AX2012.

I have a few errors :

  1. Product : When I use the ProductEntity, everything is working fine until I do not try to migrate numeric fields (depth, density, netweigth, ...). The I have an OLE DB Destination error. Fields are not null on the source (it is AX2009). I am using an ODBC source dataformat, and an SQL query from AX2009. I tried to add cast(numeric(36,12),<FieldNAme>> as DENSITY, but it doesn't work.
  2. InventPosting : When I use the wizard to create a custom entity (afterward I found that link, but it does not solve my issue... http://dynamicsuser.net/forums/p/349187/349187.aspx) I have errors saying the method is declared as private and may only be called from methods in class InventPosting. then I have no class for the project DMFInventPostingEntity

Is there anyone having sames issues? Is there any patch, is it a known bug?

Thanks for your support (if any...)

 

Regards,

Reply
Suggested Answer
Erik Paulsson responded on 27 Aug 2013 1:17 AM

Had the same problem, seems like all numeric values has to be transformed to strings in the SQL statement when working with ODBC as source. Using varchar(50) should work fine, the important thing is that the string is big enough to handle the length of the numeric value.

Reply
Steffen Berg responded on 27 Aug 2013 12:08 AM

Hi,

Did you find an answer to your first error regarding the numeric issue?

Best regard,

Steffen

Reply
ochoch responded on 27 Aug 2013 12:48 AM

Hi,

Yeap, you just have to cast(<fieldname> as varchar(50))! Incredible no!

Regards,

Reply
Suggested Answer
Erik Paulsson responded on 27 Aug 2013 1:17 AM

Had the same problem, seems like all numeric values has to be transformed to strings in the SQL statement when working with ODBC as source. Using varchar(50) should work fine, the important thing is that the string is big enough to handle the length of the numeric value.

Reply
Steffen Berg responded on 27 Aug 2013 3:40 AM

Perfect, nice to see that there is an answer.

Where exactly do you place this:cast(<fieldname> as varchar(50))? Is it in the sql statement specified in the entities in the processing Group?

Reply
Erik Paulsson responded on 27 Aug 2013 3:53 AM

I usually convert the value in the SQL statement. Something like this:

select

T1.FieldName1,

convert(nvarChar(50), T1.FieldName2) AS FieldName2,

T1.FieldName3

from Table T1

In this case only the field FieldName2 is numeric. This makes it easy to rename the column if the field does not have the same name as the field in the staging table.

Hope this answers your question.

Reply