Iterating through the actual differences

arboarbo Posts: 5
edited June 26, 2006 2:57AM in SQL Toolkit Previous Versions
Having identified each object that appears to be different - is there any way of showing the actual SQL code of the two compared objects and the lines that are actually different?

I need to compile a report that identifies the objects that are different / new and how they differ.

Best wishes,


  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hello Arne,

    Schema-wise, you can get to the underlying SQL code of an object using Work.ScriptObject(obj):
    for(int i = 0; i <= obDatabaseDifferences.Count-1; i++) 
                Difference diff = (Difference)obDatabaseDifferences[i]; 
                Work w = new Work(); 
                Regions regions1 = w.ScriptObject(diff.ObjectIn1, enOptions); 
                Regions regions2 = w.ScriptObject(diff.ObjectIn2, enOptions); 
  • Thanks Brian,

    It works nicely.

Sign In or Register to comment.