Page 1 of 1

SyncScopeProvisioning.Applies() to 5.4 , but not to 7.7 millions records

Posted: Wed 05 Dec 2018 12:45
by costeakai
Hi,
Thanks for your great work,

Code: Select all

private void Provision_local_SynchScope_cu_FilterTemplate_Click(object sender,EventArgs e)
{
   string filterTemplate = "filter_template";
   PgSqlConnection localConnection = new PgSqlConnection(@"Database=perna2;host=localhost;user id=postgres;password=***");
   DbSyncScopeDescription scopeDesc = new DbSyncScopeDescription(filterTemplate);
   scopeDesc.UserComment="Template for filtering based on perna2.pertest.nume_com.";
   DbSyncTableDescription PERTEST = PgSqlSyncDescriptionBuilder.GetDescriptionForTable("pertest",localConnection);
   scopeDesc.Tables.Add(PERTEST);
   SyncScopeProvisioning serverProvisionTemplate = new PgSqlSyncScopeProvisioning(localConnection,scopeDesc,SyncScopeProvisioningType.Template);
   serverProvisionTemplate.Tables["pertest"].AddFilterColumn("nume_com"); 
   serverProvisionTemplate.Tables["pertest"].FilterClause="t.\"nume_com\" = numecom"; 
   PgSqlParameter param = new PgSqlParameter("numecom",PgSqlType.VarChar,30);
   serverProvisionTemplate.Tables["pertest"].FilterParameters.Add(param);
   if(  !   serverProvisionTemplate.TemplateExists(filterTemplate))
   {
             ///  works upon 5.4 millions , doesn't  upon 7.7 millions ...
             serverProvisionTemplate.Apply();
   }
   }

Re: SyncScopeProvisioning.Applies() to 5.4 , but not to 7.7 millions records

Posted: Wed 12 Dec 2018 15:38
by Pinturiccio
Please specify the error text.

Please also add the following line to your code before the if block:

Code: Select all

serverProvisionTemplate.CommandTimeout = 0;
Is the issue fixed after this?