comper two snap files in sdk
yacov
Posts: 15 Bronze 2
hi
i want to compare two snap files ,get result in script
like the command line comparison
"SQLCompare.exe" /sn1:D:\bcp\HASTRSQL.HashSQL.snp /sn2:D:\bcp\YACOVR_SQLHASHAVIT.HashSQL.snp /f /q /sf:tst1.sql"
In sdk
i have load the files
CustomerDB.LoadFromDisk(@D:\bcp\YACOVR_SQLHASHAVIT.HashSQL.snp);
HashavimProductionDB.LoadFromDisk(@D:\bcp\HASTRSQL.HashSQL.snp);
i do
Differences stagingVsProduction = HashavimProductionDB.CompareWith(CustomerDB, Options.EnableDeployNow);
how to get the script
i want to compare two snap files ,get result in script
like the command line comparison
"SQLCompare.exe" /sn1:D:\bcp\HASTRSQL.HashSQL.snp /sn2:D:\bcp\YACOVR_SQLHASHAVIT.HashSQL.snp /f /q /sf:tst1.sql"
In sdk
i have load the files
CustomerDB.LoadFromDisk(@D:\bcp\YACOVR_SQLHASHAVIT.HashSQL.snp);
HashavimProductionDB.LoadFromDisk(@D:\bcp\HASTRSQL.HashSQL.snp);
i do
Differences stagingVsProduction = HashavimProductionDB.CompareWith(CustomerDB, Options.EnableDeployNow);
how to get the script
Regards
yacov -R
yacov -R
Comments
http://help.red-gate.com/help/SQLCompar ... /index.htm
for:
SQL Compare API 8.0.0
the Work.ScriptObject Method
Namespace: RedGate.SQLCompare.Engine
Assembly: RedGate.SQLCompare.Engine (in RedGate.SQLCompare.Engine.dll)
Returns the script necessary to create a SQL object.
i am using this RedGate.SQLCompare.Engine.dll.
if you using command line compare.exe like "SQLCompare.exe" /sn1:D:\bcp\HASTRSQL.HashSQL.snp /sn2:D:\bcp\YACOVR_SQLHASHAVIT.HashSQL.snp /f /q /sf:tst1.sql"
you get reuslt file that contain the difference between two snp files
i want to build comper between two snp files with sdk
after loading the files snp , how i get the diferece of the objets
thank you
yacov -R
I believe the answer is that the script generated by the code is written to standard out (the screen) - to redirect to a file simply use the redirection operator '>' and specify a file name.
LoadAndSaveASnapshotExample.cs