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

'File is locked' when OLEDB connecting

Status
Not open for further replies.

infounit

IS-IT--Management
Jun 13, 2004
6
0
0
DE
I have a database on a mapped server drive, on G:\PBA
When I connect using Pervasive OLEDB 8.1, after 2 seconds I get an error:
'-4914 File is locked'
The connection string is:
Provider=PervasiveOLEDB;Auto Translate=TRUE;Data Source=GPBA;
Before, in Control Center, I right-clicked onto 'Configuration', 'maintain named database', and added my GPBA database with Dictionaty location and data file location each 'G:\PBA'.
I did _not_ right click onto 'Databases(Client)' using 'New Database' and I did _not_ use ODBC Administrator to enter an ODBC data source.
I use V8 Server Engine for Windows (and I also have the Workgroup Engine installed, for local access.)

Dieter L. Stangl

 
Sounds like you've got two engines opening the files at the same time. What happens if you use the Function Executor to open the data file from the same client? Does it give an error? If so, which one?

info@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
> Sounds like you've got two engines opening ... <
Yes, that's what I also think about. However, I don't have any problems using my data on G:\PBA with other applications (that don't use the OLEDB approach), also Function Editor does its job like always, no problem.
Something may be wrong with my use of the OLEDB / ADO, maybe in my little test program (written in VB.NET) or with my Pervasive database names or so.
 
I found out more now:
On my workstation there is no Client for the Server Engine installed, but there is a workgroup engine installed (which should be OK for access to the server engine on the server, no ?)
But on another workstation in our network there is in the opposite _no_ workgroup engine installed, but a client to the server engine is installed.
Now, on my workstation, in the Control Center I can right-click 'Configuration' and 'Maintain Named Database', while on the workstation (which has only the client installed) I cannot: ==> 'Creating database parameters you described was rejected ! You may go on with managing named database safely'

What does that mean now ?

I think I have 2 questions:

a) When I want access to Btrieve data files on the server and on the workstation, and on the server there is a server engine installed, must I install workgroup engine _and_ server engine client on the workstation or is it enough when I install workgroup engine ?

b) Which steps must I do in order to be able to connect to a Pervasive database on the server via OLEDB provider, without having to install an ODBC data source ?

Dieter L. Stangl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top