VistaDB 6
VistaDB.Provider Namespace / VistaDBConnection Class / Open Method
Example


In This Topic
    Open Method
    In This Topic
    Opens a database connection with the settings specified by the System.Data.Common.DbConnection.ConnectionString.Opens a database connection with the settings specified by the ConnectionString.
    Syntax
    'Declaration
     
    
    Public Overrides NotOverridable Sub Open() 
    'Usage
     
    
    Dim instance As VistaDBConnection
     
    instance.Open()
    public override void Open()
    Remarks
    The provider will use an internal connection from the corresponding connection pool if pooling is enabled (it is not, by default) and a pooled connection exists. Otherwise, it will create a new internal connection (and file handle) to open the connection.
    Example
    The following example creates and opens a VistaDBConnection.
    public VistaDBConnection OpenConnection(string connectionString)
    {
        VistaDBConnection connection = new VistaDBConnection(connectionString);
        connection.Open();
        return connection;
    }
    Requirements

    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

    See Also