SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a DVWP that displays data from a rather hefty SQL query. I have two controls on the page that allow the user to modify the selection.

What I would like is for the DVWP to not query until the parameters are entered via the controls. When the query runs without parameters, it takes about 30 seconds. When it runs with parameters it takes around 5-10 seconds. I can specify default parameters, but I'll still have a long initial page load and it's unlikely that data shown initially will be what the user wants to see.

Is there an easy way to accomplish this?

share|improve this question

Setting the default parameters is the way to go. If you set them to something which will return no items, your DVWP will be as "light" as possible.

share|improve this answer
Hm. That's certainly possible, but the query will still have to run which isn't ideal. The actual ODBC data source linked to SQL Server is a super poor performer. I wonder if there's a way to have the query read something like SELECT * FROM MYVIEW WHERE null = null when the page first loads? – Boden Oct 27 '10 at 15:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.