TableMapping PartialSuccess

djsdjs Posts: 4
edited June 29, 2007 6:31AM in SQL Toolkit Previous Versions
Hi,

I’m using version 5 of your toolkit to create a utility to update production databases. One table is a mix of system data fields that must be updated as the system changes, and customer data fields that contain different values for every customer database. The plan is to exclude the customer data fields from the data comparison and to only include the system data fields for this security table.

My question is with the TableMapping.Status value after setting the customer data fields’ Include property to False and then calling TableMapping.RefreshMappingStatus. The Status property changes to PartialSuccess.

Does PartialSuccess mean there is a problem with the mapping or that, because I manually excluded some of the fields, not all of the fields have been mapped between the two tables, but the remaining fields will be included in the data compare?

I just need to know that this is the intended behavior and not a bug.

Thanks
Dan

Comments

  • This is intended behaviour. PartialSuccess is used when not all the columns in the table are going to be compared regardless of if that is due to being excluded or not mapped.

    For your fun here's part of RefreshMappingStatus() for you...
    m_Status = TableMappingStatus.Success;
    
    foreach(FieldMapping fm in m_FieldMappings)
    {
    	if (fm.Status != FieldMappingStatus.Success || !fm.Include)
    	{
    		m_Status = TableMappingStatus.PartialSuccess;
    		break;
    	}
    }
    

    As an aside what may interest you is that in the v6 API the ability to read all the user actions from the project file is available to you via the call Project.ReplayUserActions(). The alpha version should be out soon.
    Richard Mitchell
    Project Manager
    Red Gate Software Ltd
Sign In or Register to comment.