Server
server.ConnectionContext.SqlExecutionModes =
setString();
SQlConopen();
cmd.Connection = mySQlCon;
SqlExecutionModes.CaptureSql;SqlCommand cmd = new SqlCommand();
Server conServer = new Server(new ServerConnection(mySQlCon));
Database db = conServer.Databases[cmbDatabase.Text];Transfer t = new Transfer(db);
t.CopyAllObjects = true;
t.DropDestinationObjectsFirst = true;
t.CopySchema = true;
t.CopyData = true;
t.DestinationServer = cmbServer.Text;
t.CopyAllDatabaseTriggers = true;
t.CopyAllRules = true;
t.CopyAllSchemas = true;
t.CopyAllTables = true;
t.Options.IncludeIfNotExists = true;
t.CreateTargetDatabase = true;
The error (Script transfer failed.) occure on this line
StringCollection commands = t.ScriptTransfer();

Sam HobbsPosted Mar 10, 2011, 11:48 PM
Suthish NairPosted Mar 10, 2011, 2:51 PM