Consulting

Results 1 to 2 of 2

Thread: Solved: Stored Procedure not executing from scheduled task?

  1. #1
    VBAX Tutor
    Joined
    Mar 2005
    Posts
    221
    Location

    Solved: Stored Procedure not executing from scheduled task?

    Hello,

    I am currently using SQL Server Express 2008 on a PC to help transform some of my data for excel reports.

    One in particular is scheduled (via windows scheduled tasks) to execute each morning so it's ready for use when we all arrive to work.

    So I've scheduled the report to run a stored procedure on 'workbook open()' and it just does a workbook refresh all via VBA.

    Here is the weird part - it works if I open the file manually, however when it runs via the scheduled task the file looks like it's trying to refresh the data but it's almost like it cannot make a connection to the DB or something .... it basically times out/runs forever until i crash it.

    Why would the code on workbook open > refresh all work manually opening the workbook but not through scheduled task???

  2. #2
    VBAX Tutor
    Joined
    Mar 2005
    Posts
    221
    Location
    I believe i've resolved this.

    Opposed to a 'refresh all' vba, I tried selecting each worksheet to refresh....for some reason when i do each sheet individually via code, it seems to work with the scheduled task?? Resolved.

Posting Permissions

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