Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to connect to the relational engine

Status
Not open for further replies.

Tankgirl

Programmer
Feb 3, 2003
24
NZ
My app uses the following connection string
Provider=PervasiveOLEDB;Data Source=Path; to connect to a Pervasive database, all works fine with Pervasive 2000 but on V8 it won't connect it raises the error
"Unable to connect to the relational engine (is Database Name and Server available?)" as soon as it tries to open a table. Only happens on some databases not all?

 
Are you using TCP/IP or SPX to connect? What server engine are you trying to access? What happens if you change the connection string to:
Provider=PervasiveOLEDB;Data Source=<Server DBName>;Location=<Server Name>
where <Server DBName> is the database name on the server pointing to where the data resides and <Server Name> is the server name.


info@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
I am connecting to an accounting system's data through this connection so there is no database name on the server.
i.e. As long as the DDF files are present then I am usually able to connect?
What is SPX?

 
SPX is another network communication protocol. What server OS are you using?
Can you connect to the Demodata database on the server? It should automatically be created. Try to open the &quot;Class&quot; table in Demodata. Does that work?


info@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
Managed to get the data working locally - there was a pervasive loc file in the directory. Once I deleted this all was working fine locally. I then copied the working data onto the server and the same error occurs.

Pervasive is not installed on the server just the data folder is stored there. All the folders on the server are set to Read Only (same locally). Any suggestions?

OS is XP
 
Sounds like you've got the workgroup engine running. That being the case, you're going to want to set a permanent gateway using the Gateway locator utility. Ideally, you'll want to set it to a machine that is always running and is always running the workgroup engine.


info@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
I have set the gateway locator to my machine to test - do I need to do anything else i.e. change the connection string? It creates a ~PVSW~.LOC file in the data directory with
OSDEV1
\\Osguru\osguruC\Pastel\CLOTHSRU\~PVSW~.LOC (data location)

OSDEV1 being my machine

Haven't done this before so am not sure what I am doing wrong.
 
Managed to connect to the database by creating a db connection in the PCC and then changing the connection string. But it only connects the first time - the second time it won't connect. Error connecting to Pervasive....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top