Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.