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