Click here to Skip to main content
15,884,353 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
SmoException was unhandled,

An unhandled exception of type 'Microsoft.SqlServer.Management.Smo.SmoException' occurred in Microsoft.SqlServer.SmoExtended.dll

Additional information: The Integration Services component is not installed or you do not have permission to use it.

C#
Server server = new Server(textServer.Text);

           Database database = server.Databases[textDatabase.Text];


           Transfer transfer = new Transfer(database);
           transfer.CopyAllObjects = true;
           transfer.DropDestinationObjectsFirst = true;
           transfer.CopySchema = true;
           transfer.CopyData = true;
           transfer.DestinationServer = cServer.Text;
           Database newDatbase = new Database(server, textBox1.Text);
           newDatbase.Create();
           transfer.DestinationDatabase = textBox1.Text;
           transfer.Options.IncludeIfNotExists = true;
           transfer.CreateTargetDatabase = true;
           transfer.TransferData();//Gives error at this line.


What am I doing wrong? or do I need some permissions?
Posted
Comments
Sergey Alexandrovich Kryukov 25-Nov-13 11:11am    
In what line? How about comprehensive exception information? In particular, stack trace...
—SA
Cenkay Vergili 26-Nov-13 3:46am    
I am new to programming. I am still so young and I do not know many terms but I will try to explain;
At last line "transfer.TransferData();" I am having this issue.
(and Not only Microsoft.SqlServer.Smo Reference also I had to add Microsoft.SqlServer.SmoExtended .)
It creates the database I want but It does not transfer the data
I want.
Maybe It is because I use express. I've checked the link @thatraja sent I will use that solution.

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900