H
H5N1
Hello
I'm displaying report on a gridview through object data source which
gets some parameters from ddl controls. Using sql profiler I've found
out that even when controls are not yet set (by default they are set to
empty string value, so I guess they should be interpreted as nulls)
query (with empty parameters) is sent to sql server (it doesn't return
anything). It causes unnecessary server load and slows down each
postback, until all controls are set and gridview can display data.
Isn't there any way to prevent the databinding and sending query to sql
server until all object data source parameters are set (i.e. not null)?
I know something like that is possible with sql datasource.
I mean of course declarative way without adding additional biz. layer,
but if it's not possible then I'd be glad to see any elegant solutions
with small amount of additional code.
thanks
I'm displaying report on a gridview through object data source which
gets some parameters from ddl controls. Using sql profiler I've found
out that even when controls are not yet set (by default they are set to
empty string value, so I guess they should be interpreted as nulls)
query (with empty parameters) is sent to sql server (it doesn't return
anything). It causes unnecessary server load and slows down each
postback, until all controls are set and gridview can display data.
Isn't there any way to prevent the databinding and sending query to sql
server until all object data source parameters are set (i.e. not null)?
I know something like that is possible with sql datasource.
I mean of course declarative way without adding additional biz. layer,
but if it's not possible then I'd be glad to see any elegant solutions
with small amount of additional code.
thanks