How can we help you today? How can we help you today?
nsams

Activity overview

Latest activity by nsams

My code look a lot like your sample with a few tweaks so I'm not sure why it doesn't work in my program but works fine in SQL Compare... I define a set of options: m_Options = New Options m_Options = Options.IgnoreBindings _ .Plus(Options.IgnoreChecks) _ .Plus(Options.IgnoreCollations) _ .Plus(Options.IgnoreConstraintNames) _ .Plus(Options.IgnoreFileGroups) _ .Plus(Options.IgnoreFillFactor) _ .Plus(Options.IgnoreFullTextIndexing) _ .Plus(Options.IgnorePermissions) _ .Plus(Options.IgnoreQuotedIdentifiersAndAnsiNullSettings) _ .Plus(Options.IgnoreWhiteSpace) _ .Plus(Options.IncludeDependencies) _ .Plus(Options.IgnoreExtendedProperties) Then I compare the database to a snapshot file and then grab the differences. 'Set up the appropriate master database snap shot file m_sStatusObj = "m_oMasterDB" m_oMasterDB.LoadFromDisk(g_sAppPath & "" & sSnapshotFile) If g_oConvApp.CancelConversion Then MsgBox("The conversion has been cancelled.", CType(MsgBoxStyle.OkOnly + MsgBoxStyle.Information, Microsoft.VisualBasic.MsgBoxStyle), InfoCaption) GoTo EndFunction End If 'Script the database being converted lblText.Text = "Scripting database" lblSecMsg.Text = "Scripting database" ClearProgress() System.Windows.Forms.Application.DoEvents() oConnProps = New ConnectionProperties oConnProps.ServerName = g_oUser.Server oConnProps.DatabaseName = sDB oConnProps.IntegratedSecurity = False oConnProps.Password = g_oUser.Password oConnProps.UserName = g_oUser.UserID m_sStatusObj = "m_oDB" m_oDB.Register(oConnProps, m_Options) 'Compare the database being converted to the corresponding master lblText.Text = "Comparing databases" lblSecMsg.Text = "Comparing databases" ClearProgress() System.Windows.Forms.Application.DoEvents() oDiffs = m_oDB.CompareWith(m_oMasterDB, m_Options) 'Exclude all database objects that we don't care about from the 'synchronization For Each oDiff As Difference In oDiffs If oDiff.DatabaseObjectType <> RedGate.SQLCompare.Engine.ObjectType.Table And _ oDiff.DatabaseObjectType <> RedGate.SQLCompare.Engine.ObjectType.View And _ oDiff.DatabaseObjectType <> RedGate.SQLCompare.Engine.ObjectType.StoredProcedure And _ oDiff.DatabaseObjectType <> RedGate.SQLCompare.Engine.ObjectType.Function Then oDiff.Selected = False Else oDiff.Selected = True End If Next oDiff It gets stuck at the oDiffs = m_oDB.CompareWith(m_oMasterDB, m_Options) line. / comments
My code look a lot like your sample with a few tweaks so I'm not sure why it doesn't work in my program but works fine in SQL Compare... I define a set of options: m_Options = New Options m...
0 votes
Enhancement Request for making snapshots
I have a very simple yet important enhancement request. File | Create Snapshot: fill in all the information and click "Create Snapshot". Result: All the information you just entered (with the exce...
3 followers 3 comments 0 votes
This is now happening on another database of ours with a different table and constraint. Are you sure that there is no solution for this? I can't believe that our only solution would be to wait for someone to get this error, then have to go in manually and delete the constraint and then ask them to re-convert their database. It is very hard to fix this programmically. SQL Server does not let you directly delete records out of the default constraints table (sys.default_constraints). You have to do a ALTER statement on the table. The problem with that is that we don't know what table it is under until the error happens. I have been able to write a query that looks up the table name: Select sys.objects.name from sys.default_constraints inner join sys.objects ON sys.default_constraints.parent_object_id = sys.objects.object_id where sys.default_constraints.name = 'DF__tblPOBEEm__Benef__5D0B3BC8' And then I have to see how hard it would be to put that into a drop statement and have that run before the structural comparison. Even if this all works...someone else can call in the next day with a new constraint that's giving them issues and I would have to write a new query with drop for the new constraint name. There must be a better way! / comments
This is now happening on another database of ours with a different table and constraint. Are you sure that there is no solution for this? I can't believe that our only solution would be to wait f...
0 votes