Home > database >  Data window query problem
Data window query problem

Time:01-18

Consult everybody, I wrote a check function, there are two text boxes can be input, the second type is number text box corresponding database field, when the second text box input character a bit error, , then I won't work, the where clause for the table data window to the all the data are displayed, excuse me, how should solve?
The code is as follows:
String ls_select, ls_where ls_doctordept;
If sle_1. Text="" or sle_2. Text=" "then
Messagebox (" error ", "please input data!" )
The else
Dw_1. Settransobject (sqlca)
Ls_select="SELECT * FROM ORDERS"
Ls_where="where id1='" + sle_1. Text +"' and id2="+ sle_2. Text +"
"Dw_1. Setsqlselect (ls_select + ls_where)
Dw_1. Retrieve ()
End the if
  • Related