(C#)Smo Exception未得到处理 [英] (C# ) Smo Exception was unhandled
本文介绍了(C#)Smo Exception未得到处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
未处理SmoException,
Microsoft.SqlServer.SmoExtended中出现未处理的Microsoft.SqlServer.Management.Smo.SmoException类型异常。 dll
其他信息:未安装Integration Services组件,或者您无权使用它。
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.
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?
推荐答案
基于错误消息&额外的信息,我有一个线程,检查出来。
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/479651b7-e838-4d4d-b298-02cf791ced57/the-integration- services?forum = sqlsmoanddmo [ ^ ]
Based on the error message & additional information, I got a thread, check it out.
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/479651b7-e838-4d4d-b298-02cf791ced57/the-integration-services?forum=sqlsmoanddmo[^]
这篇关于(C#)Smo Exception未得到处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文