Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to check if a table is exclusively locked in VB6

Posted on 2001-07-21
3
Medium Priority
?
267 Views
Last Modified: 2011-09-20
I want to test whether a Table in Access 2000 is exclusively locked using VB6

Thanks!
0
Comment
Question by:rcbarot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 33

Expert Comment

by:hongjun
ID: 6304883
Try this

Private Sub Form_Load()
On Error GoTo Err_Handle
    Dim objConn As ADODB.Connection
   
    Set objConn = New ADODB.Connection
   
    objConn.Open "Driver={Microsoft Access Driver (*.mdb)};dbq=c:\windows\profiles\hongjun\desktop\db1.mdb;uid=sa;pwd=;"
   
    objConn.Close
    Set objConn = Nothing
    Exit Sub
   
Err_Handle:
    If Err.Number = -2147467259 Then
        MsgBox "File is exclusively locked"
    End If
End Sub

hongjun
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 7135225
A request has been made (http://www.experts-exchange.com/cleanup/Q_20320181.html) that this question be closed with the following resolution: points to hongjun

EXPERTS: Please leave any comment regarding this request here; I will return in seven (7) days to close the question.

Netminder
CS Moderator
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7141372
Wrong comment selected as Answer.

hongjun: points for you at http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20321325

Netminder
CS Moderator
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

670 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