REVENSE
Posts: 46
|
Posted: 12/27/2007, 8:13 AM |
|
Dear All
i have case like this
1) i have one texbox and one listbox on the search form, e.g. s_total, s_operator.
2) On s_operator properties i set the DataSource Type to ListOfValues with the DataSource like:
1;>=;2;<=;
3. Then i put code like this
If System.Web.HttpContext.Current.Request.QueryString("s_operator") = "1" Then
DirectCast(Select_,TableCommand).Where = "total >= '%" + System.Web.HttpContext.Current.Request.QueryString("s_total") + "%'"
else If System.Web.HttpContext.Current.Request.QueryString("s_operator") = "2" Then
DirectCast(Select_,TableCommand).Where = "total <= '%" + System.Web.HttpContext.Current.Request.QueryString("s_total") + "%'"
but when i publish and try to search i get this error
Error converting data type varchar to float
my question how to convert s_total to float so i can compare total value and s_total value
Pls any one can help me to solve this problem
Thx
Jun
|
|
|
|