2
Vote

Alter Script Generation

description

Is the alter script generation functionality working? Everytime we try to generate the script, it creates some kind of default script for fn_diagramobjects, like this
 
SET ANSI_NULLS ON
GO
 
SET QUOTED_IDENTIFIER ON
GO
 
CREATE FUNCTION dbo.fn_diagramobjects()
 
Any ideas?

file attachments

comments

Safi wrote May 13, 2008 at 9:46 PM

After compare? I think the object is encrypted.

snyderb wrote May 14, 2008 at 12:17 PM

Is that a good thing or a bad thing? Yes, after running the compare. No matter what the compare returns the attached alter script is generated.

wrote May 14, 2008 at 12:17 PM

wrote Nov 11, 2011 at 12:59 AM

guerven wrote Nov 11, 2011 at 12:59 AM

I added a check on the databaseobjects. It works now, but I did not investigate if there are any bad consequences in doing this.

File is sqlscripting under common\scripting
        var script = new StringBuilder();
        string tableName = DatabaseObjectDictionary.ObjectTypes[objectsTypes];
        if (databaseObjects == null) return "";

        var vfoundRow = this.databaseObjects.Tables[tableName].Rows.Find(new object[] { schema, name });
        if (vfoundRow == null) return "";

        DataRow foundRow = vfoundRow;

wrote Nov 11, 2011 at 12:59 AM

wrote Feb 14, 2013 at 7:02 PM