2
我编译从MSDN文档一个简单的C#控制台应用程序,Setting Up a Partition Scheme for a Table in Visual C#当出现以下错误:Visual Studio 2010错误:“非可调用成员'Microsoft.SqlServer.Management.Smo.Server.Databases'不能像方法一样使用。”
Non-invocable member 'Microsoft.SqlServer.Management.Smo.Server.Databases'
cannot be used like a method.
出错行:
//Reference the AdventureWorks2008R2 database.
db = srv.Databases("AdventureWorks2008R2");
我使用Visual Studio 2010中
PS为了编译这个,我创建了一个控制台应用程序,如How to: Create a Visual C# SMO Project in Visual Studio .NET所述。
这工作*出色*!谢谢! – Contango 2011-05-31 12:09:28