안냐세요. 하두 오랜만에 보는 거라 뭐가 뭔지 하나도 모르겠어요.
어케 수정해야 하는지좀 알켜주세요 네~~~.
if edt_Name.Text = '' then
begin
ShowMessage('성명을 입력하세요.');
edt_Name.SetFocus;
end
else if edt_Jumin.Text = '' then
begin
ShowMessage('고객번호를 입력하세요.');
edt_Jumin.SetFocus;
end
else if edt_Model.Text = '' then
begin
ShowMessage('모델명을 입력하세요.');
edt_Model.SetFocus;
end
else if (edt_Tel.Text = '') and (edt_Hptel.text = '') then
begin
ShowMessage('전화번호를 입력하세요.');
edt_Tel.SetFocus;
end
else
try
with qry_bike do
begin
close;
Sql.Clear;
Sql.Add('SELECT * FROM bikemember');
Sql.Add('WHERE (Jumin = :Pjumin)');
ParamByName('Pjumin').AsString := edt_Jumin.Text;
open;
if eof then
begin
Close;
Sql.Clear;
Sql.Add(' INSERT INTO bikemember ');
Sql.Add(' (Name, Model, tel, Hptel, Addr, Email, Jumin) ');
Sql.Add(' VALUES');
Sql.Add(' (:Pname, :Pmodel, :Ptel, :Phptel, :Paddr,' );
Sql.Add(' :Pemail, :Pjumin) ');
end
else
begin
Close;
Sql.Clear;
Sql.Add('UPDATE bikemember');
Sql.Add('SET Name = :Pname, Model = :Pmodel, tel = :Ptel,');
Sql.Add('Hptel = :Phptel, Addr = :Paddr, Email = :Pemail,');
Sql.Add('jumin = :Pjumin');
Sql.Add('WHERE jumin = '''+ edt_jumin.Text +''' ' );
end;
ParamByName('Pname').AsString := edt_Name.Text;
ParamByName('Pmodel').AsString := edt_Model.Text;
ParamByName('Ptel').AsString := edt_Tel.Text;
ParamByName('Phptel').AsString := edt_Hptel.Text;
ParamByName('Paddr').AsString := edt_Addr.Text;
ParamByName('Pemail').AsString := edt_Email.Text;
ParamByName('Pjumin').AsString := edt_jumin.Text;
ExecSQL;
Close;
Sql.Clear;
Sql.Add('commit');
ExecSQL;
ShowMessage('작업 완료.');
edt_Date.SetFocus;
end;
Except
begin
ShowMessage('작업 실패.');
end;
edt_Date.SetFocus;
end;
end;
누구더러 찾으시라는건지...뭐가 잘못된거지 써주세요