저의 프로시져를 실행하면 Parameter 'para' not found에러가 발생합니다. 원인을 알고 싶습니다.
<!--CodeS-->
procedure TfrmMain.btnSearchClick(Sender: TObject);
var sSql : String;
begin
rgList.RowCount := 0;
sSql := 'select GOOD_CD, TITLE_NM from MS_GOOD ';
with Query1 do begin
Close;
Sql.Clear;
if Trim(ediSearch.text)<> '' then begin
Case cbxSearch.ItemIndex of
0: sSql := sSql + 'Where GOOD_CD like :para';
1,-1: sSql := sSql + 'Where TITLE_NM like :para';
end;
ParamByName('para').asString := Trim(ediSearch.Text);// 여기 부분이..(?)
end
else begin
Case cbxSearch.ItemIndex of
0 : sSql := sSql + ' Order by GOOD_CD';
1,-1 : sSql := sSql + ' Order by TITLE_NM';
end;
end;
Sql.text := sSql;
Open;
First;
if not isEmpty then begin
While not Eof do begin
rgList.AddRow(True);
rgList.Cells[0,rgList.RowCount-1].Value := FieldByName('GOOD_CD').AsString;
rgList.Cells[1,rgList.RowCount-1].Value := FieldByName('TITLE_NM').AsString;
Next;
end;
end;
end;
end;
<!--CodeE-->