jayakrishnan Morayur

jayakrishnan Morayur

  • NA
  • 193
  • 258.8k

IncludeIfNotExist in trigger

Mar 12 2011 4:36 AM
conServer = new Server(new ServerConnection(mySQlCon));
Database db = conServer.Databases[cmbDatabase.Text];
Transfer
t = new Transfer(db);
ScriptingOptions
scriptOp = new ScriptingOptions();

Server db.DatabaseOptions.RecursiveTriggersEnabled = true;

t.CopyAllObjects = true;
t.DropDestinationObjectsFirst = true;
t.CopySchema = true;
t.CopyData = true;
t.DestinationServer = true;
t.CopyAllDatabaseTriggers = true;
t.Options.Triggers = true;
t.Options.IncludeIfNotExists = true;

StringCollection commands = t.ScriptTransfer();
StringBuilder sb = new StringBuilder();

i'am generate script above way

but the script of stored procedure and table are includeIfNotExists statment but trigger not includeIfNotExist statment why?

Attachment: scriptgenerate.zip

Answers (3)