0

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?

1 Answer 1

1

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.

1
  • 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
    Commented Oct 27, 2010 at 15:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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