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!

Lock file has grown too large error

Status
Not open for further replies.

mthakershi

Programmer
Aug 24, 2001
79
US
Hi folks,

I am using Paradox database with Borland C++. This is the first time I am using both of them. So I am little bit scared when I face errors.

Executable and database are in different directories. When I am running the EXE it generates Paradox lock file in same directory. Once it increases size around 25 MB it gives error "Lock file has grown too large" and after that "Capacity not supported".

I found solution to create 'Tables', 'PRIV' and 'NET' directories in folder having EXE and set sessions properties. For that I need to call following functions.

DbiSetPrivateDir(szPath);
DbiSetProp(hSes, sesNETFILE, (UINT32)szPath);

Can somebody tell me from where in code I can call this functions? My project in BC++ Version 5.0 and I am using data modules and Woll2Woll controls for connecting to BDE and access to database.

If someone has some other idea to fix this problem without moving my database files then please help me out.

Any help is appreciated,
Malay Thakershi
mthakershi@yahoo.co.in
 
Malay,

Well, first off, this forum is for Paradox for Windows, the database management software currently provided with Professional editions of Corel's WordPerfect Office. as well as older versions. It also supports Paradox/DOS, an older form of Paradox designed before Windows gained ascendance.

Typically, you'll want to post C++ related questions in forums devoted to that. Borland, for example, hosts a number of possible newsgroups. See for a list of available ones.

You may also find contains links to interestng information, such as their TI's, other web sites, and so forth.

You may also find the Search facility at useful. I entered "lock file grown too large" and found several several dsocuments that outlined various strategies, including:

--
--
--
And many others.

Personally, I don't have a great deal of experience with BC, but I've written a number of BDE applications using Delphi, so I think I can point you in the right direction.

Basically, you'll want to make those calls almost immediately after allocating the BDE session handle (hSes, in your snippet). These settings need to be set before opening any tables using that session. (I'm not certain that's entirely true, but it's where I've always done it and haven't had any problems). Since you're using Infopower, I'd make certain that hSes is initialized before opening the forms (or data module) containing the datasets bound you your Infopower controls. This means you might need to instance the form manually.

Hope this helps...

-- Lance
 
I think this thing has something to do with NET directory. I used to get this error most of the time when EXE and DB both were on network.

Now I am packing the table programatically thus avoiding this error.

Have fun,
Malay Thakershi
mthakershi@yahoo.co.in
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top