A .NET Framework error occurred during execution of user-defined routine or aggregate "USP_CONFIGURATIONDATAIMPORT_IMPORTDATA": System.Data.SqlClient.SqlException: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_ADHOCQUERY_QUERYCATEGORYCODEID", The conflict occurred in database "XXXX_XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", table "dbo.QUERYCATEGORYCODE, column "ID". The statement has been terminated. System.Data.SqlClient.SqlException: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlCommand.RunExecuteNonQuerySmi(Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult.result, String methodName, Boolean sendToPipe)
This error occurs if the Configuration export does not contain the QueryCodeTable or the QueryCodeTable is not located above AdHoc Query in the hierarchy. To correct this error export the configuration data with these modifications.