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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pervasive DB locked, unable to access via intranet 1

Status
Not open for further replies.

BenF

Programmer
Jun 25, 2002
18
0
0
CA
We are running Pervasive SQL 2000 (for AccPac).

I have been programming (in vb ASP) such things as customer lookup, product status for use with our intranet. Everything has worked great until I point my web pages to the live database. Then the error:

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Pervasive][ODBC Engine Interface][Data Record Manager]The file is locked(Btrieve Error 85)

appears.

I understand what the error is, but when I run w3monv75, I dont see the files locked (they are opened in normal mode, with no record or transaction lock).

Details: I make a DSN-Less connection to the DB, it works fine when I point to a copy of the DB but not on the live db. Basically, the code I use to connect to the db is that found under DevCenter ASP at Pervasive.com.

Can anyone shed some light as to how I can rid this error?

-Ben
ben@stardiamondtools.com
 
Sounds like you've got two engines trying to open the same files. When you open the copy of the db, do those files show up in the Monitor? If not, then you're using two engines. Do you have an engine installed on the web server and the server where the Accpac data is? If so, you're probably using two engines.
Are you using a Client Interface DSN or an Engine Interface DSN? If the data is remote, you should be using a Client Interface DSN. This is true even if you are doing a DSN-less connection since the DSN is just a stored connection string. mirtheil@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
You're right, I am running two engines, one on the web server and one on the Accpac data server. So, I did as you suggested and used the client like so:

dbConn.Open "Driver={Pervasive ODBC Client Interface};servername=watermelon;dbq=\\watermelon\Pacman\Accpac\DATA\STARCO"

(I was previously using:
dbConn.Open "Driver={Pervasive ODBC Engine Interface};dbq=\\watermelon\Pacman\Accpac\DATA\STARCO")



but I still get the error
Pervasive][Pervasive ODBC Client Interface][Pervasive ODBC Client Interface][Pervasive ODBC Client Interface LNA]No available transport protocol for the Pervasive Network Services Layer.


Now, I have checked the Pervasive server's communication supported protocols and everybody supports Microsoft TCP/IP.

Any idea what gives?
-Ben
 
What happens if create an Engine DSN on the Accpac data server and then use that Engine DSN in the connection string:
dbConn.Open &quot;Driver={Pervasive ODBC Client Interface};servername=watermelon;ServerDSN=<serverDSN>&quot;

Another thing to check is try pinging the Accpac server from the web server. Does it work? If not, you might try fixing the DNS or adding the IP address to the HOSTS file.
One other thing to check is to make sure that the Pervasive.SQL 2000 Relational service is running (assuming the Accpac server is a NT/2000 server) or the MGRSTART has been run (on a NetWare server).
mirtheil@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
Pinging watermelon [192.168.0.1] with 32 bytes of data:
Reply from 192.168.0.1: bytes=32 time<10ms TTL=128
etc


I wish that was the problem :(
Next, I tried:
objConn.ConnectionString = &quot;Driver={Pervasive ODBC Client Interface};servername=watermelon;ServerDSN=PRO&quot;
objConn.Open

I get the same error ([sub]Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Pervasive][Pervasive ODBC Client Interface][Pervasive ODBC Client Interface][Pervasive ODBC Client Interface LNA]No available transport protocol for the Pervasive Network Services Layer.
/asptest2.asp, line 17[/sub]

(Aside:I dont think it matters, but I have the client and engine installed on the web server.)

Meanwhile, I checked to see if the Pervasive.SQL 2000 Relational service is running (NT 4 Server-Admin Tools>Services - its started, automatic) and it was.



What DOES work is the Accpac application. I have accpac installed on this web server (the machine I am working on) it accesses the db no problem, just as every other computer in our office does.

Thoughts?
 
That doesn't suprise me. Accpac uses the Btrieve interface and goes through a different communication module than ODBC. Since you have the client installed on the Web server, can you use the Pervasive Control Center to access the database? If not, are you getting the same error?
Can you also try the following connect string:
objConn.ConnectionString = &quot;Driver={Pervasive ODBC Client Interface};servername=watermelon;ServerDSN=PRO;TransportHint=TCP&quot;
mirtheil@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
Since you have the client installed on the Web server, can you use the Pervasive Control Center to access the database?
It appears so. When, on the web server I click on Pervasive Control Center, Center>Connect to Server and put in WATERMELON, then it connects and lists watermelon including the pro database(when I expand WATERMELONs databases). When I click the + on the PRO database, I can see all the tables (eg. APADV, APATR etc...) in that PRO connection.


I tried adding the transport hint, but no luck. Same &quot;No available transport protocol for the Pervasive Network layer..&quot;



When everyone leaves the office, I can use the odbc engine from the webserver to connect to the Accpac(watermelon) server no problem. Then I shout, Eureeka! Then people come back and my ballon is popped, back to trying the client. Am I having a really hard time or is there something I could do better. Any more ideas?
 
Can you use the PCC on the webserver at the same time as the Accpac users? Also, can you double click on the a table in the PCC and does it display data?
Based on the description of what you're seeing, I'd say you've got two engines but I'm not sure.
mirtheil@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
Can you use the PCC on the webserver at the same time as the Accpac users?
What does this mean? Yes I can open the PCC on the webserver, and all the Accpac users can still access accpac.


Also, can you double click on the a table in the PCC and does it display data?
No. IT does not, but it does not give an error either. I dont think it is supposed to display anything, it never has. I can see all the name of the tables, but thats it. Same thing with the database on the Strawberry (web server).


Based on the description of what you're seeing, I'd say you've got two engines but I'm not sure.

I think we concluded that earlier. One on the web server and one on the accpac server.
Or are you saying i have two engines on the accpac server? If so, and this is a problem how might i go about finding out if i have two engines on the accapac server and removing one....
 
What does this mean? Yes I can open the PCC on the webserver, and all the Accpac users can still access accpac.
Can you use Accpac on the webserver? Does it display data? If so, can you then open the PCC (on the webserver)and try to open a table? Does that fail?
No. IT does not, but it does not give an error either. I dont think it is supposed to display anything, it never has. I can see all the name of the tables, but thats it. Same thing with the database on the Strawberry (web server).
Double clicking on the table name in the PCC should open the SQL Data Manager and should display all records. Does anything happen when you double click? You said no error but what does happen?
I think we concluded that earlier. One on the web server and one on the accpac server.
Or are you saying i have two engines on the accpac server? If so, and this is a problem how might i go about finding out if i have two engines on the accapac server and removing one....

You can only have one engine on any given machine running at any given time. You can have two machines both running engines that could cause problems if the Btrieve/ODBC can't communicate with the other machine. The first thing I would suggest would be to check the webserver to see if the Pervasive.SQL Server engine is running on the machine (check Services for Pervasive.SQL or Btrieve services and stop them). Secondly, you can check for a workstation/workgroup engine. This will show up in the system tray and can be disabled there. If either engine is running, stop them and try the ODBC again.
mirtheil@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top