You can define parameters for the SqlDataSource control. If a parameter value is an empty string, the driver automatically converts that into a NULL value, which can lead to unexpected query resultsand sometimes to no query results at all.
To avoid this automatic conversion, set the ConvertEmptyStringToNull to equal false in the SqlDataSource control.
Here's an example:
<asp:SqlDataSourceControl id="SqlDataSource1" RunAt=Server >
<SelectParameters>
<asp:Paramter Name="parameter1" ConvertEmptyStringToNull=false> </asp:Parameter>
</SelectParameters>
</asp:SqlDataSourceControl>
If you have a hot tip and we publish it, we'll pay you. However, due to accounting overhead we no longer pay $10 for a single tip submission. You must accumulate 10 acceptable tips to receive payment. Be sure to include a clear explanation of what the technique does and why it's useful. If it includes code, limit it to 20 lines if possible.
Submit your tip here.