+ Reply to Thread
Results 1 to 4 of 4

Problems With Opening ADODB Connection

  1. #1
    Registered User
    Join Date
    02-06-2013
    Location
    Pleasant Hill, CA
    MS-Off Ver
    Excel 365
    Posts
    27

    Problems With Opening ADODB Connection

    I build many spreadsheets that require database functionality via ActiveX Data Objects. Please see code in attached file, focusing on the ConnectToSpreadsheet function. I have two issues, one new and one longstanding, as follows:

    • New Issue: the code to establish the connection has always taken almost no time to run. A couple of weeks ago the code started taking 12 - 13 seconds to complete. (Click the Test button to run.) The line that takes so much time is line that opens the connection (conn.Open). This is occurring in all files that include this function. Any ideas why all of a sudden this started taking so long to complete? Could it be something in the connection string?
    • Longstanding Issue: the code runs fine when the file is located in a local drive, but fails when the file is located on the Desktop or other shared or non-local drives. Any ideas how to correct this?


    Any help is appreciated.

    Michael Souder
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor MikeVol's Avatar
    Join Date
    12-30-2020
    Location
    Odessa / Ukraine
    MS-Off Ver
    MSO Prof Plus 2021 x64 (En)
    Posts
    502

    Re: Problems With Opening ADODB Connection

    Quote Originally Posted by masouder View Post
    [*]New Issue
    The result of the connection is shown in the screenshot below.
    Quote Originally Posted by masouder View Post
    [*]Longstanding Issue
    There is no way to test unfortunately.
    Attached Images Attached Images
    NOTE: As the original poster/owner, only you can mark your thread as SOLVED (Thread Tools above Post #1).
    You can say "Thanks" in your thread to everyone who offered to help you.
    You can also reward them by clicking * "Add Reputation" under their username on the left.
    With Regards, MikeVol.

  3. #3
    Registered User
    Join Date
    02-06-2013
    Location
    Pleasant Hill, CA
    MS-Off Ver
    Excel 365
    Posts
    27

    Re: Problems With Opening ADODB Connection

    Thanks for your test.

    New issue: Based on your test results, it worked perfectly on your computer - it completed the connection in under a second. Any ideas why it is taking so long on my computer?

    Longstanding issue: Where did you save the file to in order to test? If a local drive then I expect the results you got. Did you try it from your Desktop?

  4. #4
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    883

    Re: Problems With Opening ADODB Connection

    There has been a recent update causing time issues depending on your build version

    https://answers.microsoft.com/en-us/...3-2ffa23c2f4bf
    Last edited by WasWodge; 04-19-2025 at 01:22 AM.
    If my solution worked (or not) please let me know. If your question is answered then please remember to mark it solved

    Computers are like air conditioners. They work fine until you start opening windows. ~Author Unknown

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. help with ADODB.Connection
    By Ivancovish in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-07-2019, 12:10 PM
  2. Adodb Connection
    By Syed Haider Ali in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-30-2018, 08:03 AM
  3. ADODB Connection
    By kenny.fsw in forum Access Tables & Databases
    Replies: 12
    Last Post: 08-06-2015, 01:17 PM
  4. [SOLVED] ADODB Connection Problem?
    By jsabo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-09-2015, 03:23 PM
  5. ADODB connection - Changing connection path via fileDialog
    By cajand in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-08-2015, 08:06 AM
  6. VBA and ADODB.Connection
    By AedanLee in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-29-2010, 06:37 AM
  7. vb adodb connection passing value
    By jtwork in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-25-2008, 04:30 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1