Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2007

    Unanswered: Accessing linked tables in catalog is very slow


    I was wondering if anyone can help - I have a Microsoft Access (2002) application that's split into a frontend and a backend.

    Basically, the location of the backend is stored in an .ini file, and every time the frontend is started it reads this file, checks the table links, and if they're different to the location in the .ini file then it relinks them.

    This is all fine and dandy on a single-user system, but when someone else is using the backend database at the same time it becomes very slow (2-3 minutes) to check the table links, or indeed to access anything in the 'Tables' collection of the catalog.

    This doesn't make any sense, as I am opening a connection to the local (frontend) database, and it shouldn't be trying to access the backend at all as I am only trying to find out where the frontend table is linked to.

    Here is my code:

    Dim adoCNN As ADODB.Connection
    Set adoCNN = New ADODB.Connection

    With adoCNN
    .Provider = "Microsoft.JET.OLEDB.4.0"
    .Open sFrontEndPath
    End With

    Dim adoCat As ADOx.Catalog
    Set adoCat = New ADOx.Catalog

    Set adoCat.ActiveConnection = adoCNN


    All this is fine, but I get a long delay when I try to access any property of the tables collection...

    MsgBox adoCat.Tables("Test").Properties("Jet OLEDB:Link Datasource")


  2. #2
    Join Date
    Jan 2007
    Provided Answers: 12
    Are you closing your connections? Both ADO and to the ini file?
    SET conn = Nothing
    Home | Blog

  3. #3
    Join Date
    Nov 2007
    Yes, afterwards, but I am trying to access the collection when the object is still open (otherwise it wouldn't work at all)

  4. #4
    Join Date
    Nov 2007
    Just to let you know, I fixed the problem. Opening a recordset before the catalog seems to work.

    No idea why!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts