How can we help you today? How can we help you today?
jbravoh

Activity overview

Latest activity by jbravoh

It´s clear, Brian. But don´t works. My code is like: Dim db1 As New Database Dim db2 As New Database db1.RegisterForDataCompare(New ConnectionProperties(MyServer1, MyDB1, myAccount1, myPass1), Options.Default) db2.RegisterForDataCompare(New ConnectionProperties(MyServer2, MyDB2, myAccount2, myPass2), Options.Default) Dim mappings As New TableMappings Dim tableMapping As TableMapping = CType(mappings.Join(db1.Tables("[dbo].[myTable1]"), db2.Tables("[dbo].[myTable2]")), TableMapping) tableMapping.FieldMappings.Add(New FieldMapping(tableMapping.Obj1.Fields("myField1"), tableMapping.Obj2.Fields("myField2"), FieldMappingStatus.Success)) tableMapping.RefreshMappingStatus() mappings.Add(tableMapping) Dim session As New ComparisonSession session.CompareDatabases(db1, db2, mappings) Dim provider As New SqlProvider Dim block As ExecutionBlock Try block = provider.GetMigrationSQL(session, True) Dim executor As RedGate.SQL.Shared.BlockExecutor = New BlockExecutor executor.ExecuteBlock(block, MyServer2, MyDB2, False, myAccount2, myPass2) Catch ex As SystemException Dim err As String err = "Error: " & ex.Message Finally block = provider.Block If (TypeOf block Is ExecutionBlock) Then block.Dispose() End If End Try session.Dispose() db1.Dispose() db2.Dispose() This is your code translated to VB.NET and don´t works to me. Regards, Jorge / comments
It´s clear, Brian. But don´t works. My code is like: Dim db1 As New Database Dim db2 As New Database db1.RegisterForDataCompare(New ConnectionProperties(MyServer1, MyDB1, myAccount1, myPass1), Opt...
0 votes
Thanks, Brian. I´m testing but dont works. I have two tables with same structure but the first have two rows and second, three: script don´t make nothing. My code is this: Dim db1 As New Database Dim db2 As New Database db1.RegisterForDataCompare(New ConnectionProperties(MyServer1, MyDB1, myAccount1, myPass1), Options.Default) db2.RegisterForDataCompare(New ConnectionProperties(MyServer2, MyDB2, myAccount2, myPass2), Options.Default) Dim mappings As New TableMappings Dim tableMapping As TableMapping = CType(mappings.Join(db1.Tables("[dbo].[foo]"), db2.Tables("[dbo].[bar]")), TableMapping) tableMapping.FieldMappings.Add(New FieldMapping(tableMapping.Obj1.Fields("WidgetID"), tableMapping.Obj2.Fields("WidgetID"), FieldMappingStatus.Success)) tableMapping.RefreshMappingStatus() mappings.Add(tableMapping) Dim session As New ComparisonSession session.CompareDatabases(db1, db2, mappings) Dim provider As New SqlProvider Dim block As ExecutionBlock Try block = provider.GetMigrationSQL(session, True) Dim executor As RedGate.SQL.Shared.BlockExecutor = New BlockExecutor executor.ExecuteBlock(block, MyServer2, MyDB2, False, myAccount2, myPass2) Catch ex As SystemException Dim err As String err = "Error: " & ex.Message Finally block = provider.Block If (TypeOf block Is ExecutionBlock) Then block.Dispose() End If End Try session.Dispose() db1.Dispose() db2.Dispose() / comments
Thanks, Brian. I´m testing but dont works. I have two tables with same structure but the first have two rows and second, three: script don´t make nothing. My code is this: Dim db1 As New Database D...
0 votes
Comparing tables without primary key using API and VB.NET
I´m using API SQL Data Compare 5 with VB.NET 2003 and I don´t find a method to select another key due to the tables that I´m using don´t have primary keys. Using product SQL Data Compare 5 I saw th...
2 followers 9 comments 0 votes
Select/unselect tables using API
Hi friends. I´m testing a evaluation SQL Data Compare API with VB.NET 2003 and I don´t know if I can unselect any tables like stand alone application. In my tests I can´t to unselect one table or m...
1 follower 1 comment 0 votes