+ Reply to Thread
Results 1 to 3 of 3

Does My VBA Code To Refresh CSV Power Query Connections Need To Change for MySQL Queries?

  1. #1
    Registered User
    Join Date
    03-05-2011
    Location
    New York
    MS-Off Ver
    Excel 2016
    Posts
    84

    Does My VBA Code To Refresh CSV Power Query Connections Need To Change for MySQL Queries?

    I use VBA to open an excel file and refresh the power query connections. The code works fine when I'm connecting to a CSV file as the data source but recently I switched the query to a MySQL data source. Since I did that I'm getting "Application-defined or object-defined error" on the .Refresh line.

    When I open the file and push refresh on the MySQL connection the query refreshes with no problems. Does something need to be changed?

    Please Login or Register  to view this content.

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Does My VBA Code To Refresh CSV Power Query Connections Need To Change for MySQL Queri

    This worked for me...

    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Registered User
    Join Date
    03-05-2011
    Location
    New York
    MS-Off Ver
    Excel 2016
    Posts
    84

    Re: Does My VBA Code To Refresh CSV Power Query Connections Need To Change for MySQL Queri

    Quote Originally Posted by sktneer View Post
    This worked for me...
    I was getting a lot of inconsistent results and tbh its possible there was too much data.
    I ended up switching the code up anyway which seemed to give me better performance.

    Please Login or Register  to view this content.

+ 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. [SOLVED] Change data structure using Formula or Power Query ( Get & Transform)
    By chullan88 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-04-2017, 02:58 AM
  2. code to refresh power query not working ..
    By Hassan1977 in forum Excel General
    Replies: 0
    Last Post: 08-31-2016, 12:31 PM
  3. Power Query - Storing and Connections
    By James McEwan in forum Excel General
    Replies: 0
    Last Post: 08-09-2016, 08:19 AM
  4. Power Query MySQL Database error
    By brent_milne in forum Excel General
    Replies: 0
    Last Post: 08-21-2015, 11:21 AM
  5. SQL connections, wait with the code until query is done!
    By Reemet in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-14-2015, 02:38 AM
  6. Refresh a mysql query
    By mintmin in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-11-2009, 09:55 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