ldb cannot delete

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a ldb file from a database that is open with 0 kb in it and it
automatically reaapears every time I delete it. I cannot open the database
or delete this file.
 
Hi Schafer,

I believe that Arvin is correct about the db being left
open by a user who has crashed or shut down improperly.

I have this problem from time to time and I use a utility
program named 'LDBViewer'. This is an old (Access 95-97)
application but it still works with Access 2k thru 2003.
The application will show you who has signed onto the db
during the current session and who is still active.

The utility is hard to find but it can still be
downloaded from the microsoft downloads web site.

To find the hyperlink to download it, go to the knowledge
base advanced search page. Type in 'Jet Utilities' in the
for text box, Select Microsoft Access 97 as the search
product, and set the using: option to the exact phrase.

I got 6 hits for the search and the first one is 'ACC:
Microsoft Jet Utilities Available in the Download Center'.
Click on that hyperlink and you will see Article ID :
176670 displayed. about 2/3rd down the page is the
hyperlink to download 'jetutils.exe'

Download and run the file and it will break out to three
files. 'LDBView.exe' is the LDBView utility. It still
works with Access XP and 2003 even though they state that
it hasn't been tested with Jet 4.0 db's.

After you start 'LDBView.exe', select 'File'\'Open' and
select the database in question. If there is an 'LDB'
file that wasn't closed properly, it will display and
show you who still has the db open. (I am assuming that
this is a shared application)

Hope this helps, Pete
 
I previously wrote a subroutine that you can insert into a front end
database and run from the Immediate Window; it's based on KB article 285822.
It will tell you who (including you) currently is "in" the backend database.

--

Ken Snell
<MS ACCESS MVP>


'*******************************************
'* Subroutine WhoIsInTheDatabaseLockFile *
'*******************************************

Public Sub WhoIsInTheDatabaseLockFile()
' Written by Ken Snell (January 31, 2005)

' *** OUTPUTS A LIST OF USERS IN THE DATABASE:
' *** 1. COMPUTER NAME ("COMPUTER NAME")
' *** 2. LOGON NAME ("LOGIN_NAME")
' *** 3. WHETHER USER IS STILL CONNECTED TO THE DB (USER ID
' *** REMAINS IN .LDB FILE UNTIL LAST USER EXITS OR
' *** UNTIL THE SLOT IS CLAIMED BY ANOTHER USER)
' *** ("CONNECTED")
' *** 4. WHETHER USER'S CONNECTION TERMINATED UNDER NORMAL
' *** CIRCUMSTANCES ("SUSPECT_STATE")

' *** ADAPTED FROM MICROSOFT KNOWLEDGE BASE ARTICLE 285822

Dim cn As New ADODB.Connection
Dim dbs As DAO.Database
Dim rs As New ADODB.Recordset
Dim strNewDataSource As String, strCNString As String
Dim strCurrConnectString As String

' Replace the string in the next step with the name of a real
' linked table in the database
Const strLinkedTableName As String = "Name_of_A_Linked_Table"

Const strDatabaseString As String = "DATABASE="
Const strDataSourceText As String = "Data Source="

On Error GoTo Err_Msg

strCurrConnectString = CurrentProject.Connection
strCNString = Mid(strCurrConnectString, InStr(strCurrConnectString, _
strDataSourceText) + Len(strDataSourceText))
strCNString = Left(strCNString, InStr(strCNString, ";") - 1)

Set dbs = CurrentDb
strNewDataSource = dbs.TableDefs(strLinkedTableName).Connect
strNewDataSource = Mid(strNewDataSource, InStr(strNewDataSource, _
strDatabaseString) + Len(strDatabaseString))
Debug.Print "File containing the data tables: " & strNewDataSource

cn.ConnectionString = Replace(strCurrConnectString, strCNString, _
strNewDataSource, 1, 1, vbTextCompare)
cn.Open

' The user roster is exposed as a provider-specific schema rowset
' in the Jet 4.0 OLE DB provider. You have to use a GUID to
' reference the schema, as provider-specific schemas are not
' listed in ADO's type library for schema rowsets

Set rs = cn.OpenSchema(adSchemaProviderSpecific, _
, "{947bb102-5d43-11d1-bdbf-00c04fb92675}")

'Output the list of all users in the designated database.

Debug.Print rs.Fields(0).Name, "", rs.Fields(1).Name, _
"", rs.Fields(2).Name, rs.Fields(3).Name

While Not rs.EOF
Debug.Print rs.Fields(0), rs.Fields(1), _
rs.Fields(2), rs.Fields(3)
rs.MoveNext
Wend

Exit_Sub:
On Error Resume Next
rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing
dbs.Close
Set dbs = Nothing
Exit Sub

Err_Msg:
Debug.Print "Error occurred. Error number " & Err.Number & ": " &
Err.Description
Resume Exit_Sub

End Sub
 
Pete

That download works great but the file is empty. No one in database is there
a way to change file?
 
shadyschafer said:
All users have read and write permissions to directory it is on a snap server.

Snap server? That may be your problem.

"Jet uses virtual file locks to handle its multiuser capabilities, and
these locks do NOT behave the same on non-Windows platforms. "

Some work and some don't.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
I have had this working on this server for 3 years. I just think a computer
was shut down wrong and the database thinks it is still open. I'm allowed to
delete file but it comes back with the same 0 KB size and same old revision
date 2/16/05. All other databases in the same folder on same server work
fine.
 
Now file opens fine and ldb file is gone. Not sure what did it. I did
nothing but wait.

Thanks for all the help!! I will use the viewer in the future to see who is
 
The server may have been slow releasing the locks on the files. To force a
release, sometimes rebooting the server helps.
 
Arvin,

Correct for a Windows server, but I think he was using a Snap server.
However, there may be a utility in it also. I don't know, I haven't used
one.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top