콤보박스를 여러개써서...
선택을하는것을 검색하려합니다.
선택안한건 검색에서 제외하구염....
그래서 아래와같이 했는뎅...에러가나는군염....
procedure TForm1.Button1Click(Sender: TObject);
begin
with query1 do
begin
Close;
sql.Clear;
sql.Add('select * from CRM_CUSTOMER ');
sql.Add('where cname=cname ')
if combobox1.Text <> '' then begin
//<=[Error] Unit1.pas(41): Missing operator or semicolon
Sql.Add(' and ADDRH Like '+combobox1.Text+'%'' ');
end;
if combobox2.Text <> '' then begin
Sql.Add(' and SEX Like '+combobox2.Text+' ');
end;
open;
end;
end;
겅부한지 얼마안되서리.... 모가 잘못됐는지 모르겠습니다...
부디 답변부탁드립니다......
> 콤보박스를 여러개써서...
> 선택을하는것을 검색하려합니다.
> 선택안한건 검색에서 제외하구염....
> 그래서 아래와같이 했는뎅...에러가나는군염....
>
> procedure TForm1.Button1Click(Sender: TObject);
>
> begin
> with query1 do
> begin
> Close;
> sql.Clear;
> sql.Add('select * from CRM_CUSTOMER ');
> sql.Add('where cname=cname ')
>
> if combobox1.Text <> '' then begin
> //<=[Error] Unit1.pas(41): Missing operator or semicolon
>
> Sql.Add(' and ADDRH Like '+combobox1.Text+'%'' ');
> end;
> if combobox2.Text <> '' then begin
> Sql.Add(' and SEX Like '+combobox2.Text+' ');
> end;
> open;
> end;
> end;
>
> 겅부한지 얼마안되서리.... 모가 잘못됐는지 모르겠습니다...
> 부디 답변부탁드립니다......
==========
안녕하세여...
에러 대로 라면 ;(세미콜론)이 빠졌다는 건데 ..
보면 Where 절에 진짜로 이게(;)빠졌네여..
맨 끝에요..
그럼 즐프하세여..
혹 다른 문제가 있으시면 연락 바라겠습니다.