DTI is the Distributed Tuning Interface and DTO is the Distributed Tuning Object. They are interfaces to access the PSQL management functions (like Monitor, DBNames, Settings, etc). I don't have any
VB.NET code but here's a small C# sample that I got:
Code:
using System;
using DTOLib;
namespace dtoTest
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
string compName = null;
string userName = null;
string password = null;
DTOLib.dtoResult result ;
if (args.LongLength < 1)
{
Console.WriteLine("Invalid options.\n");
return;
}
if (args.LongLength == 3)
{
compName = args[0].ToString();
userName = args[1].ToString();
password = args[2].ToString();
}
Console.WriteLine("Pervasive Sample using DTO and C#");
Console.WriteLine("Lists defined Pervasive Database Names and associated information.");
Console.WriteLine("Copyright 2003 Pervasive Software");
DtoSession mDtoSession = new DTOLib.DtoSession();
try
{
result = mDtoSession.Connect (compName, userName, password);
if (result != 0)
{
Console.WriteLine("Error connecting to server. Error code:");
}
else
{
Console.WriteLine("Connected to " + mDtoSession.ServerName );
DtoDatabase mDtoDatabase = new DTOLib.DtoDatabaseClass();
int dbnCount = mDtoSession.DSNs.Count;
Console.WriteLine("Found " + dbnCount.ToString() + " DBNs");
for (int iCount = 1; iCount <= dbnCount; iCount++)
{
Console.WriteLine("DBN " + iCount.ToString() + ": ");
mDtoDatabase = mDtoSession.Databases[iCount];
Console.WriteLine("Name: " + mDtoDatabase.Name);
Console.WriteLine("DDF Path: " + mDtoDatabase.DdfPath.ToString());
Console.WriteLine("Data Path: " + mDtoDatabase.DataPath.ToString());
Console.WriteLine("Flags: " + mDtoDatabase.Flags.ToString());
Console.WriteLine("");
}
result = mDtoSession.Disconnect();
Console.ReadLine();
}
}
catch (Exception e1)
{
Console.WriteLine(e1.Message.ToString());
}
}
}
}
You'll need to add the DTO library (COM interface) as a reference.