+ Reply to Thread
Results 1 to 1 of 1

SQL Statement takes too long to refresh

  1. #1
    Registered User
    Join Date
    04-30-2012
    Location
    Massachusetts, US
    MS-Off Ver
    Excel 2003
    Posts
    4

    SQL Statement takes too long to refresh

    Hello,

    I'm writing a script for a database integration project using multiple upload sheets and I need to delete all contents from all worksheets and then refresh all SQL queries before running the conversion scripts that I'm calling from seperate modules (I have a tad bit of OCD when it comes to seperating my scripts) but the problem I'm running into is the script looks for certain column headers. So while the SQL query is still grabbing data, my script is looking for headers that don't exist yet. I've tried multiple wait functions and can't find one that allows the SQL statement to continue while it waits. Any help would be greatly appreciated. Thanks. Sample code below.

    Please Login or Register  to view this content.
    Nick

    EDIT Solved. The only way I found the SQL statement would continue to run while waiting is the application.ontime method where the coding looked like this:

    Please Login or Register  to view this content.
    EDIT Even better, Data Range Properties for the external data import has a box that says Background Refreshing! Unchecked this and everything worked....... figures I missed it
    Last edited by Nrowell92; 05-02-2012 at 01:47 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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