Solved

Locked Database

Posted on 1998-06-01
1
162 Views
Last Modified: 2013-11-20
I have made a tracking sysem that uses a database, occasionally all the programs on different machines will say that the database is locked by a certain computer. Is there a way to catch or test if the database is locked, then unlock it?

Lucidity
0
Comment
Question by:lucidity
1 Comment
 
LVL 3

Accepted Solution

by:
tma050898 earned 50 total points
Comment Utility
Probably the simples (and least db specific) way would be to try and lock the file for read/write permission with _access. That way, if the file is locked, your call will fail.

BOOL bLocked = (-1 == _access(_T("YourFile"), 6));

Tom

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Define unique primary key 9 81
string initialization in java 11 103
countEvens challenge 2 55
noX challenge 17 75
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now