I've created a method in C# which is using the DatabaseMigrator class to update a database from a StrataFrame generated package.
------------------------------------------------------------------------------------------------------------
Here is a code snippet:
try
{
DatabaseMigrator _dbMigrator = null;
_dbMigrator = InitializeDatabaseMigrator(new Isync(), _dbMigrator);
DatabaseTargetName dbToUpdate = new DatabaseTargetName("XXXX");
dbToUpdate.NameOnServer = "YYYY";
_dbMigrator.DeployMetaData("C:\Packages\Database.pkg","", new DatabaseTargetName[] { dbToUpdate });
}
catch(Exception ex)
{
throw ex;
}
------------------------------------------------------------------------------------------------------------
I've debugged the method and in the last line, when the DeployMetaData method is begin called, an exception is being given with the following message:
Exception Message: Non-negative number required.Parameter name: value
Can you please help and suggest why this is exception is being thrown?