예제 #1
0
        public void GetDeltaImport()
        {
            using (SQLManagementAgent ma = new SQLManagementAgent())
            {
                Configuration.Schema = ma.DefaultSchemaXml.XmlDeserializeFromString <SchemaConfiguration>();
                Schema schema = ma.GetSchemaDetached();

                // first get full data to get deltawatermark
                ma.Schema     = schema;
                ma.ImportType = OperationType.Delta;
                ma.CustomData = "140180";
                ma.PageSize   = 1;

                System.Collections.ObjectModel.KeyedCollection <string, ConfigParameter> configParams = null;
                ma.OpenImportConnectionDetached(configParams, schema, null);

                GetImportEntriesRunStep rs = new GetImportEntriesRunStep();

                GetImportEntriesResults rest = new GetImportEntriesResults();
                rest.MoreToImport = true;
                while (rest.MoreToImport)
                {
                    rest = ma.GetImportEntriesDetached(rs);
                }

                CloseImportConnectionRunStep dummyCloseImportRunStep = null;
                ma.CloseImportConnectionDetached(dummyCloseImportRunStep);
            }
        }
예제 #2
0
 public void GetMASchema()
 {
     using (SQLManagementAgent ma = new SQLManagementAgent())
     {
         Configuration.Schema = ma.DefaultSchemaXml.XmlDeserializeFromString <SchemaConfiguration>();
         Schema schema = ma.GetSchemaDetached();
     }
 }