We have a C# web service that is used to query several databases from various vendors. The program reads in SQL and connect string from a config file and uses the System.Data.Oledb package to access various OLE DB providers -- It works very well with all other databases. Using the Pervasive OLE DB provider, I am able to access the data in our customer's Pervasive database only intermittently. But more times than not, I receive the following exception:
Message: Unable to connect to the relational engine (is Database Name and Server Available?)
And then sometimes I wait a minute and try again at it works. The data is on a remote server. I have tried many versions of connect string, but here is the latest one that works:
Provider=PervasiveOLEDB;Data Source=\\DBSERVER\RMSDATA;Location=DBSERVER;User ID=XXX
As instructed in the documentation, when using a UNC path, I have an entry in the Windows registry for \\DBSERVER\RMSDATA so that the dialog box does not prompt. I have Pervasive.SQL 9 SP2 installed on the local machine and access to the database via Control Center is solid and consistent. Why am I having intermittent access via the OLE DB provider??
Any help is greatly appreciated.