Check to see that the QVService account has rights to access the server that hosts SQL and has rights to the DB. It might also make sense to make sure that something else is not running the same thing from somewhere else. I had a client that had a QVW that was failing to refresh becuase a user had an Access DB open. The user would update the DB during the day, as was her duty, but then just leave it open and running all night. The QVService couldnt get in to refresh records becuase something else was making it "wait in line". I know that Permission issues will typically crash a task quickly, but you never know. Also, the log files will sometimes give you some hints.
Maybe you and other users are locking tables.
You could try to include a NOLOCK statement in your queries.
You can find more details in the following thread:
Hope this helps,
Are you running MS SQL Server?
There is an explanation of NOLOCK here.
SELECT COUNT(*) FROM SalesHistory WITH(NOLOCK)
does work in QV. Just tried it.
Don't know if it will solve your problem though..