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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 23.05.2014, 13:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
emeadaxsupport: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_ModelElementData_HasModelId_LayerId". The conflict occurred in database "YourDataBaseName_model", table "dbo.Model"
Источник: http://blogs.msdn.com/b/axsupport/ar...odel-quot.aspx
==============

Given scenario:

You receive the following failure when compiling the application:

The INSERT statement conflicted with the FOREIGN KEY constraint "FK_ModelElementData_HasModelId_LayerId". The conflict occurred in database "YourDataBaseName_model", table "dbo.Model"



Cause:

This might be caused by some metadata pieces that have offending combination)



Resolution suggestion:

a. Disable the FK constraint from model database by running following SQL statement:

EXEC sp_msforeachtable "ALTER TABLE ? NOCHECK CONSTRAINT all"

b. Do a full application compile

c. Run the following SQL query to check the affected objects :



select top 100 *fromModelElementDatamed

where notexists

( select 1 fromUTILMODELSumwheremed.ModelId=um.IDandmed.LayerId=Layer)

d. Take necessary actions to correct the affected objects

e. Enable the FK constraint again on your Model Database by running following SQL statement:

EXEC sp_msforeachtable "ALTER TABLE ? WITH CHECK CHECK CONSTRAINT all"

f. Do a full XPP compilation and a full CIL generation




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

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
emeadaxsupport: Violation of PRIMARY KEY constraint 'PK_ModelElementData_ElementHandle' error installing some hotfixes on Microsoft Dynamics AX 2012 R2 Blog bot DAX Blogs 0 08.01.2014 22:13
ax-erp: Choosing a Primary Key: Natural or Surrogate? Blog bot DAX Blogs 0 18.12.2012 02:11
emeadaxsupport: Error when upgrading to AX 2012 Feature Pack: The UPDATE statement conflicted with the FOREIGN KEY constraint "FK_ModelElementData_HasModelId_LayerId" Blog bot DAX Blogs 0 20.07.2012 00:11
при построении перекрёстных ссылок выдаётся сообщение об ошибках mmmax DAX: Программирование 10 21.01.2005 12:42
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 02:41.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.