StrataFrame Forum

Non-negative number required

http://forum.strataframe.net/Topic30993.aspx

By Melvin Xuereb - 3/1/2012

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?
By Ivan George Borges - 3/1/2012

Hi Melvin.

Can you post the stack trace?
Also, have you tried deploying this same package using the DDT and then having a look where it breaks and what the log file says?
My first guess without any more information would be a change made to a table that is part of a Data Deployment Package.