BeetleDev.com
info
contact
Saturday, December 15, 2018
Beetle Blog
SqlDataSource with Select parameters does not work: CancelSelectOnNullParameter
By: douglas - ASP.net - 1/11/2008 2:54:06 PM

When you have an SqlDataSource that has a SelectCommand and Select parameters.  If the select parameters are optional or null the datasource will not return any records.

This may occur when using a stored procedure.  Testing the datasource in visual studio returns records and testing the stored procedure will also return records.  However the datasource and datagrid it binds to does not return any records.

The issue may be caused by a property in the SqlDataSource: CancelSelectOnNullParameter.  This property is defaulted to true and will prevent the select command from running if select parameters are null.

Set CancelSelectOnNullParameter="false"



Last Modified: 1/11/2008 2:54:06 PM

Beetle Blog v0.2.2


Copyright © 1997 - 2018 BeetleDev.com. All rights reserved.