procedure TfrmShohin.BtnKensakuClick(Sender: TObject);
begin
//クエリーClose
qryWSMHP.Active := False;
//データ検索(CLプログラム呼び出し)
with Cal400MAKEWK do
begin
//AS400指定
AS400 := DataModule1.AS400;
//パラメータ指定
Value[0] := IntToStr(RGJoken.ItemIndex);
Value[1] := EditName.Text;
value[2] := '0';
//実行
try
Execute;
except
MessageDlg('データ検索が実行できません。',
mtInformation,[mbOK],0);
Exit;
end;
//戻り値をチェック
if Value[2] <> '0' then
begin
MessageDlg('該当データが存在しません。',
mtInformation,[mbOK],0);
EditName.SetFocus;
Exit;
end;
end;
//検索結果を取得
with qryWSMHP do
begin
try
Prepare;
Active := True;
except
MessageDlg('ファイルが開けません。',
mtInformation,[mbOK],0);
Active := False;
UnPrepare;
Exit;
end;
end;
end;
|