PRB: LDB File Grows When You Use ADO to Access 97 MDB Hosted on Novell (236101)



The information in this article applies to:

  • ActiveX Data Objects (ADO) 2.0
  • ActiveX Data Objects (ADO) 2.1
  • ActiveX Data Objects (ADO) 2.1 SP2
  • ActiveX Data Objects (ADO) 2.5
  • ActiveX Data Objects (ADO) 2.6
  • Microsoft Visual Basic Learning Edition for Windows 6.0
  • Microsoft Visual Basic Professional Edition for Windows 6.0
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0

This article was previously published under Q236101

SYMPTOMS

Using ADO to connect to a Microsoft Access 97 database hosted on a Novell 3.x, 4.x, or 5.x Server, you may see the .ldb file grow ("bloat").
  • The bloat may occur even though the number of users are not increasing.
  • The bloat occurs with both the Jet OLE DB Providers 3.51 and 4.0 and with the ODBC Provider with the Microsoft Access ODBC Driver.
  • The bloat does not occur if the Microsoft Access 97 database is hosted on a Windows NT network.
The .ldb file grows until the maximum number of Jet database users, 255, are listed in the .ldb file. Once the maximum number of users is exceeded, you receive a run-time error. You may see the following error:
Too many active users.
You may see the following error, using the ODBC Provider:
Run-time error '-2147467259(80004005)' [Microsoft][ODBC Microsoft Access Driver]Cannot open database '(unknown)'. It may not be a database that your application recognizes, or the file may be corrupt.

CAUSE

The file grows because the locks are not being released. The locks are not released because Novell clients handle multiple file opens differently than Microsoft clients.

RESOLUTION

Novell has re-engineered the Novell client to issue the unlocked NetWare Core Protocol (NCP) before closing a multiple opened file. The change is available in the Novell 3.2 client. In addition, an updated client32.nlm (10/7/1999 or later) can be obtained from Novell Technical Support.

To obtain the updated client32.nlm, connect to Novell Technical Support and search for the article at:

MORE INFORMATION

In the following example, a global connection to a Microsoft Access 97 .mdb file is established in the Form Load event. In addition, a new connection is opened, closed, and destroyed every second.

Steps to Reproduce Behavior

  1. Copy the Microsoft Access 97 Nwind.mdb database that comes with Visual Basic 6.0 to a shared folder on a Novell server.
  2. Configure a System data source name (DSN) named Test that uses the Microsoft Access Driver (*.mdb) to connect to the Nwind.mdb on the Novell server.
  3. In Visual Basic 6.0, create a new Standard EXE project. Form1 is created by default.
  4. Add a reference to ADO 2.1. From the Project menu, click References and then select the Microsoft ActiveX Data Objects 2.1 Library.
  5. Add a Timer control to Form1. Timer1 is created by default.
  6. Set the Interval property of Timer1 to 1000 (1 second).
  7. Paste the following code into Form1's Code Window:
    Dim cnGlobal As New ADODB.Connection
    Private Sub Form_Load( )
    ' This connection remains open for the life of the app
      cnGlobal.Open "Data Source=Test"
    End Sub
    
    Private Sub Form_Unload(Cancel As Integer)
    ' Close the lifetime connection
      cnGlobal.Close
      Set cnGlobal = Nothing
    End Sub
    
    Private Sub Timer1_Timer( )
    'Create and destroy the temporary connection every second
      Dim cnTemp As New ADODB.Connection
      cnTemp.Open "Data Source=Test"
      cnTemp.Close
      Set cnTemp = Nothing
    End Sub 
    					
  8. Execute the code. In a few minutes, you may see the following error:
    Run-time error '-2147467259(80004005)' [Microsoft][ODBC Microsoft Access Driver]Cannot open database '(unknown)'. It may not be a database that your application recognizes, or the file may be corrupt.
  9. While the program is running, examine the Nwind.ldb database locking file that is created in the same folder as the .mdb file. You may either open the Nwind.ldb file using Notepad, or examine the Nwind.ldb file in detail using the LDBView utility. Examining the .ldb file allows you to see the number of database connections growing.

REFERENCES

For more information, please see the following article available at Novell's site:

Article 10016657: "Access Database application runs out of file"

http://support.novell.com

For more information about .ldb files and to obtain the LDBView utility, please see the following article in the Microsoft Knowledge Base:

176670 Microsoft Jet Utilities Available on MSL


Modification Type:MajorLast Reviewed:5/8/2003
Keywords:kbDatabase kbMDACNoSweep kbOSNovell kbpending kbprb KB236101