Highlighted
Absent Member.
Absent Member.
374 views

Acucobol runtime not clearing Access ldb file when displaying Crystal Report

[Migrated content. Thread originally posted on 10 February 2011]

Hi,

We are using (and were the ones who developed) the technique listed on the old forum to dynamically set the database location, user, and password when displaying a Crystal Report from within Acucobol. Click here to view the old forum thread

We have now changed it to allow our users to have their Crystal Reports use both MSSQL and Access databases. We had to do this because when you are mixing database types withing the report, you have to set the database name, password, and user for each table.

This all works fine, except for one thing - The Access ldb (lock database file) is not removed after viewing the report. For example, when you view the report that uses the Access Database "Test.mdb", it creates a "Test.ldb" file in the same folder as the database. After closing the report viewing window, the "Test.ldb" is still there. If you try to delete it from the folder, it says it's in use. After we do a stop run on the runtime, the file is still there, but you can now delete it.

The runtime does have permissions to the folder. I've tried it with the database on my C: drive and a network drive. I've tried destroying all the handles I'm using, but I would think doing a STOP RUN should free up any resources.

If you open the report in Crystal Reports, it also creates the ldb file, but when you exit from Crystal Reports, the ldb file is removed.

Any help or ideas would be appreciated.

Thanks,

Paul DuBois
EDC Technology
0 Likes
1 Reply
Highlighted
Absent Member.
Absent Member.

RE: Acucobol runtime not clearing Access ldb file when displaying Crystal Report

My initial thought was that perhaps the connection / dataset was not properly closed, or there may be a handle that has not been destroyed.

I presume the test.mdb and related code you refer to is minimum code, in which case I believe my suggestions above should be easy to control. If not, I suggest you try a minimum code and see if this also leave the lock file behind.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.