示例#1
0
文件: Ddl.cs 项目: MunwarMMR/Dbdeploy
        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;
        }
示例#2
0
文件: Ddl.cs 项目: MunwarMMR/Dbdeploy
        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;
        }