| Author |
Message |
ThomasDev
Joined: 17 Jul 2012 Posts: 1
|
Posted: Tue Jul 17, 2012 5:42 pm Post subject: SqlProvider -> GetMigrationSQL throw NullReferenceException |
|
|
Hi,
I am new with SQL DATA Compare SDK 10. I am currently experencing this null exception during the call to SqlProvider/GetMigrationSQL. Here's the code excerpt,
Dim provider As SqlProvider
Dim block As ExecutionBlock
Dim str As String
Try
provider = New SqlProvider()
'run the SQL on destination DB server
block = provider.GetMigrationSQL(session, True)
Catch ex As Exception
str = ex.ToString
End Try
The details of exception looks like that,
System.NullReferenceException: Object reference not set to an instance of an object. at #8ZK.#j2K.#kOW(#x1K #Zds, ComparisonSession #RlYb, Boolean #hkl) at RedGate.SQLDataCompare.Engine.SqlProvider.#CbL(ComparisonSession #RlYb, Boolean #hkl) at RedGate.SQLDataCompare.Engine.SqlProvider.#DbL(ComparisonSession #RlYb, SelectionDelegate #UKPb, Boolean #hkl) at RedGate.SQLDataCompare.Engine.SqlProvider.GetMigrationSQL(ComparisonSession session, SelectionDelegate select, Boolean runOnTwo) at Thomas.MultiLang.DBSynchronizer.SyncDBData() in C:\Projects\Thomas\Flex\Thomas.Server\Thomas.MultiLang\Manager\DBSynchronizer.vb:line 165"
Throught my online search, I got some sense that about two database tables schema may be different. So i used Redgate Sql compare Tool to compare the two DB and the result was that the two DB were identical.
Could you tell me where went wrong?
Thanks,
Susan |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6346 Location: Red Gate Software
|
Posted: Wed Jul 18, 2012 1:40 pm Post subject: |
|
|
Hi Susan,
It looks like you have to build a list of differences (using the CompareDatabases method) before you can use this method. Please see:
http://sdk.red-gate.com/index.php/SQLProviderExample _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group