共用方式為


Refresh 方法

Updates the Database object.

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
Public Overrides Sub Refresh
'用途
Dim instance As Database

instance.Refresh()
public override void Refresh()
public:
virtual void Refresh() override
abstract Refresh : unit -> unit 
override Refresh : unit -> unit 
public override function Refresh()

實作

IRefreshable. . :: . .Refresh() () () ()

備註

The Refresh method updates the Database object properties from the instance of SQL Server. For information about refreshing data programmatically, see SQL Server 2008 Native Client 程式設計.

範例

'Connect to the local, default instance of SQL Server.
Dim srv As Server
srv = New Server

'Reference the AdventureWorks database.
Dim db As Database
db = srv.Databases("AdventureWorks")

'Rename the database
db.Rename("AdventureWorks2")

'Refresh the properties on the database.
db.Refresh()
db.Rename("AdventureWorks")