jayakrishnan Morayur

jayakrishnan Morayur

  • NA
  • 193
  • 258.7k

Script transfer failed.

Mar 10 2011 1:28 AM

Server

server.ConnectionContext.SqlExecutionModes =

setString();

SQlConopen();


cmd.Connection = mySQlCon;



server = new Server(cmbServer.Text);
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;


StringCollection commands = t.ScriptTransfer();

The error (Script transfer failed.) occure on this line
StringCollection commands = t.ScriptTransfer();

Answers (2)