'Declaration
Public Overrides NotOverridable Sub Close()
'Usage
Dim instance As VistaDBConnection instance.Close()
public override void Close()
'Declaration
Public Overrides NotOverridable Sub Close()
'Usage
Dim instance As VistaDBConnection instance.Close()
public override void Close()
Exception | Description |
---|---|
System.Data.Common.DbException | The connection-level error that occurred while opening the connection. |
It is considered a best practice to close the database connection as soon as you are finished with it. Close() is called automatically from Dispose(), so putting the VistaDBConnection instance in a using() statement is the easiest way to ensure that it is cleaned up promptly.
Since Close() is necessary in order to release the file handle on the database file if you rely on Dispose() of your own object to call this method (or Dispose()) make sure it is when "disposing" and that it is not left for finalizing or an object desctructor call.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
VistaDBConnection Class
VistaDBConnection Members
Class VistaDBConnection