MAcmd.CommandText = "select Sum(price) from sale where startdate='"+TextBox1.Text+"' and startdate='"+TextBox2.Text+"'";
cannot be equal to both values, unless they are the same string; is that what you expect?
I would also guard against using text strings for date comparisons, you should always
values as they cannot be misinterpreted. Strings of the form
are ambiguous; is that 10th of December or October 12th?