Recently a question came up on how to get a list of all of the database names on a Pervasive / Actian PSQL server from C#. The short answer is to use the DtoDatabase object within the Distributed Tuning Object (DTO) COM object. A reference to the DTO Library will need to be added for this code to work.
This sample is a simple console application that takes three paramaters (ServerName, UserName, Password).
Here’s the code sample that shows how to get the list:
static void Main(string args)
string compName = null;
string userName = null;
string password = null;
if (args.LongLength < 1)
if (args.LongLength == 3)
compName = args.ToString();
userName = args.ToString();
password = args.ToString();
Console.WriteLine("List Pervasive Database using DTO and C#");
DtoSession mDtoSession = new DTOLib.DtoSession();
result = mDtoSession.Connect(compName, userName, password);
if (result != 0)
Console.WriteLine("Error connecting to server. Error code:");
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());
result = mDtoSession.Disconnect();
catch (Exception e1)
Mirtheil Software is pleased to announce the release of PSQLDBSearch . PSQLDBSearch is a lightweight Windows application that will search an entire Actian / Pervasive PSQL database for values. PSQLDBSearch can search all of the tables or one table at a time.
More information and a trial download is available at http://mirtheil.com/psqldbsearch.
Mirtheil Software is pleased to announce the release of WebViser. WebViser is a lightweight Windows application that will track and monitor websites on a timed basis. If you’ve ever wanted to know if a web site goes down while you’re not looking, WebViser can help.
More information and a trial download is available at http://mirtheil.com/webviser.
Recently while trying to build an InstallShield 2012 InstallScript installation, the Jenkins job failed because IsCmdBld.exe returned an errorlevel of
-1073741819. After searching through various forums and web sites, I found a workaround that involved disabling the .NET dependency scanning. This was done by setting the “.NET Scan at Build” option on the component to “None”. This let the build complete with no errors displayed.
Eventually I also found one post related to an error with the InstallShield dependency scanner. This error was later found to be a known issue in InstallShield 2012. It had been fixed in InstallShield 2013 and InstallShield 2015. The forum post included a link to a Knowledge Base article (https://flexeracommunity.force.com/customer/articles/en_US/ISSUE/Q204455) that includes a hot fix for InstallShield 2012.
Recently, I was working on a WebAPI project and had it working in Visual Studio 2013 using IIS Express. Then I deployed it to a standard IIS running on Windows 7 and everything failed. Status 404 was being returned from all routes. I tried all of the standard troubleshooting options but finally found the problem.
My Application Pool was set to .NET 2.0. I reset it to .NET 4.0 and everything started working just fine.
Welcome to Mirtheil Software. We hope you find what you are looking for.