Jump to content

MessageDlg Don't Work Well


joyfack

Recommended Posts

Please i'm usin MessageDlg to ask and make warning in my web application. But it not workin well. 

The instructions after se click of the user don't execute.

 if MessageDlg('Did you Need to save Data ?',mtConfirmation, [mbYes, mbNo] ) = mrYes then
        begin
            with DM.ADO_Enr_1 do
                          begin
                          close;
                          SQL.Clear;
                          SQL.Add('INSERT INTO Product (name, price) Values (:name,:price)');
                          Parameters.ParamByName('name').Value:= EdName.Text;
                          Parameters.ParamByName('price').Value:= EdPrice.Text;
                          ExecSQL;
                          end;

                         EdName.Clear;
                         EdPrice.Clear;

                         MessageDlg('Enregistrement réalisé avec succé',mtConfirmation,[mbok]);

            end
  else

The block Begin ...... End is not execute.

 

Thanks in advance.

Link to comment
Share on other sites

  • Administrators
MessageDlg(constCloseWindows, mtWarning, mbYesNo, CloseCallbackAnonProc);

procedure TfmmParentSearchResults.CloseCallbackAnonProc(Sender: TComponent; Res: Integer);
begin
  if Res = mrYes then
  begin
    ...
    ...
  end;
end;

 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...