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?
Loading

Karthikeyan AnbarasanPosted Mar 19, 2011, 12:35 AM
jayakrishnan MorayurPosted Mar 18, 2011, 11:43 PM
Karthikeyan AnbarasanPosted Mar 18, 2011, 10:00 AM
can you post your complete code... im not sure abt this line which class its referring?
Transfer t = new Transfer(db);