Ejemplo n.º 1
0
        public static bool triggersEqual(Trigger trigger1, Trigger trigger2)
        {
            string ddl1 = Regex.Replace(ddl(trigger1, Dialect.generic), "\\s", "");
            string ddl2 = Regex.Replace(ddl(trigger2, Dialect.generic), "\\s", "");

            return ddl1 == ddl2;
        }
Ejemplo n.º 2
0
        public static string ddl(Trigger trigger, Dialect dialect)
        {
            string sql = "";
            OdbcCommand query;
            OdbcDataReader reader;
            string platformDdl = "";

            sql = "sp_helptext '" + trigger.name + "'";
            query = new OdbcCommand(sql,trigger.table.database.connection);
            reader = query.ExecuteReader();

            while (reader.Read())
            {
                platformDdl += (string)reader[0];
            }
            reader.Close();
            return platformDdl;
        }