Results 1 to 5 of 5
  1. #1
    jennifers is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Sep 2019
    Posts
    19

    Access VBA Linked to SQL - Connection is busy with results for another command.

    Connection is busy with results for another command. ODBC Call Fail error on linked table. Has anyone encountered this before? The issue is only happening for 1 linked table. I have already tried to relink the table multiple times with MARS (multiple active result sets) property set to true. When I convert the linked table to a local table there is no call fail error and the procedure completes fine.

  2. #2
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    What does the line below mean?
    Quote Originally Posted by jennifers View Post
    I have already tried to relink the table multiple times with MARS (multiple active result sets) property set to true.
    I have never heard of (or needed to set) the MARS property? (Which might be a lack of knowledge on my behalf?)
    What makes you think you need it set?
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    jennifers is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Sep 2019
    Posts
    19
    Quote Originally Posted by Minty View Post
    What does the line below mean?


    I have never heard of (or needed to set) the MARS property? (Which might be a lack of knowledge on my behalf?)
    What makes you think you need it set?
    When i looked at the details of the ODBC error details it gave me an indication that for some reason another connection to that same table was interfering with the update I was trying to make and that's when I found out that by default the ODBC connection has the MARS (Multiple Active Result Sets )property set to false. Even after setting it to true, it didn't help get rid of the ODBC error

  4. #4
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I am confused....
    I don't understand what "Access VBA Linked to SQL" means. You say you are having problems creating a linked table. What does "VBA and SQL" have to do with creating linked tables?


    You have an Access FE and a SQL Server BE?
    You created an ODBC connection (and it works)?
    You can link to other tables in the BE?
    There is one table in the BE that you cannot link to? Is there already a link to that table in the Access FE?

  5. #5
    SamL is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2021
    Location
    NJ
    Posts
    20
    When I convert the linked table to a local table there is no call fail error and the procedure completes fine.
    I bet you're running queries on the linked table, and queries run asynchronously. This means that Access doesn't wait for the query to finish before continuing to run code. Queries on linked tables take longer to run because of the time it takes to run the data on the link. Ergo, future commands that depend on the results of the query will have to wait - and it can't. This would cause the error message.

    In your VBA, try pulling in the linked table as a local table, as you have already experimented. Run your process and then delete the local table.

    If you change the data in your local table during your process, you will have to delete the original linked table, export the changed local table to the original location, and re-link it.

    Good luck,
    Sam
    Last edited by SamL; 06-16-2021 at 09:33 PM. Reason: fix up language

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 18
    Last Post: 02-02-2021, 09:01 AM
  2. ODBC connection for Access 2016 - results in error
    By Ashish_Panchal in forum Access
    Replies: 3
    Last Post: 11-25-2016, 01:35 AM
  3. Replies: 3
    Last Post: 12-17-2015, 07:01 AM
  4. Replies: 2
    Last Post: 12-03-2015, 10:02 AM
  5. Replies: 0
    Last Post: 03-08-2012, 03:12 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums