Esempio n. 1
0
        static public bool FeatureClassHasReplicationID(IFeatureDatabaseReplication db, int fc_id)
        {
            using (DbConnection connection = db.ProviderFactory.CreateConnection())
            {
                connection.ConnectionString = db.DatabaseConnectionString;
                DbCommand command = db.ProviderFactory.CreateCommand();
                command.Connection  = connection;
                command.CommandText = "SELECT " + db.DbColName("FC_ID") + " FROM " + db.TableName("GV_CHECKOUT_OBJECT_GUID") + " WHERE " + db.DbColName("FC_ID") + "=" + fc_id;

                connection.Open();
                object obj = command.ExecuteScalar();

                return(obj != null);
            }
        }
Esempio n. 2
0
        static public void DeleteReplLocks(IFeatureDatabaseReplication destDB, int destFc_id)
        {
            using (DbConnection connection = destDB.ProviderFactory.CreateConnection())
            {
                connection.ConnectionString = destDB.DatabaseConnectionString;
                DbCommand command = destDB.ProviderFactory.CreateCommand();
                command.CommandText = "DELETE FROM " + destDB.TableName("GV_CHECKOUT_LOCKS") + " WHERE " + destDB.DbColName("FC_ID") + "=" + destFc_id;
                command.Connection  = connection;

                connection.Open();
                command.ExecuteNonQuery();
            }
        }
Esempio n. 3
0
 static public void GetReplConflicts(IFeatureDatabaseReplication sourceDB, int sourceFc_id, DataTable conf_table)
 {
     using (DbConnection connection = sourceDB.ProviderFactory.CreateConnection())
     {
         connection.ConnectionString = sourceDB.DatabaseConnectionString;
         DbCommand command = sourceDB.ProviderFactory.CreateCommand();
         command.CommandText = "SELECT * FROM " + sourceDB.TableName("GV_CHECKOUT_CONFLICTS") + " WHERE " + sourceDB.DbColName("FC_ID") + "=" + sourceFc_id;
         command.Connection  = connection;
         DbDataAdapter adapter = sourceDB.ProviderFactory.CreateDataAdapter();
         adapter.SelectCommand = command;
         adapter.Fill(conf_table);
     }
 }