Actually, I create a few textboxs for user to enter criteria for them to
search the data under vb.net application.
when user leave the texbox(criteria) is blank, it will show up all the data.
my SQL statement would be like
select * from table1 where field1 between textbox1.text and textbox2.text
AND field2 between textbox3.text and textbox4.text........until field 5.
When user key in something in the textbox, then I just simply use the
textbox value. then no problem for my sql statment.
but when user leave all textbox(criteria) blank, meaning that the user want
to see all information, then I can not bring the textbox blank value in the
sql statement, because there is no such function like "select * from table1
where field between and "......because my textbox are blank value.....
so I am thinking to find out the min value of ascii code and max value of
ascii, so when it detect my textbox1.text is blank, then it will not be
shown blank, but instead of the mininum value of ascii code.
"select * from table1 where field between (min value ascii) and (max value
of ascii)"