VistaDB 5
Members  Example 






VistaDB.DDA Namespace : VistaDBEngine Class
VistaDBEngine Class
Core VistaDB engine class. Manages DDA connections.
Syntax
'Declaration
 
<System.Reflection.DefaultMemberAttribute("Item")>
Public NotInheritable Class VistaDBEngine 
'Usage
 
Dim instance As VistaDBEngine
[System.Reflection.DefaultMember("Item")]
public sealed class VistaDBEngine 
public class VistaDBEngine sealed; 
System.Reflection.DefaultMemberAttribute("Item")
public sealed class VistaDBEngine 
[System.Reflection.DefaultMember("Item")]
public __gc __sealed class VistaDBEngine 
[System.Reflection.DefaultMember("Item")]
public ref class VistaDBEngine sealed 
Example
This sample shows how to work with DDA.
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);
        }
    }
}
Inheritance Hierarchy

System.Object
   VistaDB.DDA.VistaDBEngine

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