AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 15.05.2015, 15:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
emeadaxsupport: Unable to insert data into the Channel database - String or Binary data would be truncated
Источник: http://blogs.msdn.com/b/axsupport/ar...truncated.aspx
==============

Dynamics AX
2012 R2/R3 Retail



Description:



While inserting a Distribution package job like 1010 into the Channel database following message appears and the operation stops.



Full error message:

Microsoft.Dynamics.Retail.StoreConnect.Request.SQLHandler.ProcessSourceRequestHeaderException:
ProcessTargetRequestHeader failed due to an InvalidOperationException.

connectionString:
Data Source=743R1;Initial Catalog=POSDB;Integrated Security=True;MultipleActiveResultSets=True;Connect
Timeout=60;Encrypt=True;TrustServerCertificate=True;Application
Name="Commerce Data Exchange Async Client" --->
System.InvalidOperationException: The given value of type String from the data source cannot be
converted to type nvarchar of the specified target column. --->
System.InvalidOperationException: String or binary data would be truncated.


at
System.Data.SqlClient.SqlBulkCopy.ConvertValue(Object value, _SqlMetaData
metadata, Boolean isNull, Boolean& isSqlType, Boolean&
coercedToDataFeed)

--- End of inner exception stack trace ---





How to troubleshoot the issue:

The message “String and Binary data would betruncated”, means that the data length of a string is longer than accepted
by the field.



Validate which field is longer than accepted by

  • Copy your Channel database to the same server as your AX database

  • Change the AX database name in the script attached

  • Open a new Query on the Channel database and execute the statement





Result:

The result shows us that the Dirparytable NameAlias has a record that is 45
characters in length in the AX database, but only 20 characters are allowed in
the channel database.





tableName

ColumnName

CHANNELLEN

HQMAXLEN

DIRPARTYTABLE

NAMEALIAS

20

45

NUMBERSEQUENCETABLE

TXT

30

35

BARCODESETUP

DESCRIPTION

30

26

RETAILTENDERTYPETABLE

NAME

30

23

RETAILSIZEGROUPTABLE

DESCRIPTION

30

22

INVENTMODELGROUP

NAME

30

16

RETAILSTYLEGROUPTABLE

DESCRIPTION

30

15

CASHDISC

DESCRIPTION

30

11







The solution:

  • You can change the schema in the channel database to accept the needed input

    • Retail SDK/CreateDatabase.dll if done correctly

    • Or you can rename the value in AX to only have 20 characters





Author: Kim
Truelsen

Date:
15/5-2015




Источник: http://blogs.msdn.com/b/axsupport/ar...truncated.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
emeadaxsupport: SEPA affected objects Blog bot DAX Blogs 0 29.11.2013 13:11
emeadaxsupport: Unable to close shift due to records in Offline database Blog bot DAX Blogs 0 20.08.2013 15:11
emeadaxsupport: AX 2012 Retail: Creating Offline Database fails Blog bot DAX Blogs 0 14.05.2012 17:11
emeadaxsupport: Multiple database data files, table partitioning using multiple file groups… and Microsoft Dynamics AX 2009 Blog bot DAX Blogs 3 04.10.2011 16:30
String or binary data would not be truncated DreamCreator DAX: Программирование 4 22.02.2005 03:06

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 04:17.