VistaDB 5
Example 






OpenDDA Method
Open a new DDA connection. You may wish to instantiate one DDA object globally in your namespace and share it. Class VistaDBEngine
Syntax
'Declaration
 
Public Function OpenDDA() As IVistaDBDDA
'Usage
 
Dim instance As VistaDBEngine
Dim value As IVistaDBDDA
 
value = instance.OpenDDA()
public IVistaDBDDA OpenDDA()
public function OpenDDA(): IVistaDBDDA; 
public function OpenDDA() : IVistaDBDDA;
public: IVistaDBDDA* OpenDDA(); 
public:
IVistaDBDDA^ OpenDDA(); 

Return Value

IVistaDBDDAConnection instance
Example
using System;
using VistaDB.DDA;
using VistaDB.Diagnostic;
public class MyClass
{
    internal static readonly IVistaDBDDA DDAObj = VistaDBEngine.Connections.OpenDDA();
 
    public void DoWork(string databaseName)
    {
        try
        {
            IVistaDBDatabase db = DDAObj.OpenDatabase(databaseName, 
                VistaDBDatabaseOpenMode.NonExclusiveReadWrite, null);
 
            try
            {
                // do some work here
            }
            finally
            {
                db.Dispose();
            }
        }
        catch (VistaDBException ex)
        {
            MessageBox.Show("VistaDB Exception:" + ex.Message);
        }
        catch (Exception ex)
        {
            MessageBox.Show(".NET Exception:" + ex.Message);
        }
    }
}
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

Reference

VistaDBEngine Class
VistaDBEngine Members
Class VistaDBEngine