실행은 되는데 전혀 결과값이 변하지 않고 있어요...
좀 급하거든요...도움을 좀 주셔요...
var
Form3: TForm3;
teachar_div:string;
old_div:string;
implementation
uses Unit1;
{$R *.DFM}
procedure TForm3.ToolButton1Click(Sender: TObject);
begin
with query1 do
begin
close;
sql.clear;
sql.Add(' update dlp4 set code=:code');
sql.Add(' where name=:name and teachar=:teachar and old= :old');
sql.add(' and teachar='''+teachar_div+'''');
sql.add(' and old='''+old_div+'''');
parambyname('name').asstring:=trim(edit1.text);
parambyname('code').asstring:=trim(edit2.text);
parambyname('teachar').asstring:=trim(combobox2.text);
parambyname('old').asstring:=trim(combobox1.text);
execsql;
showmessage('선택항목을 수정하였습니다');