Jump to content

haentschman

Members
  • Content Count

    211
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by haentschman


  1. Hi...:classic_cool:

    Quote

    I have recently upgraded from Delphi 4 to Delphi 10.4 - yes, a big leap indeed.

    ...wow. :classic_blink:

    Quote

    so sadly now my knowledge has become obsolete.

    ...better. :classic_tongue:

     

    Questions:

    We know IBConsole and IBDatabase ...but which database you use? Firebird or Interbase?

     

    Tools:

    Admintool: https://dbeaver.io/

    ...better than console. :classic_cool:

     

    Tip:

    Never use T???Table...only T???Query and SQL!


  2. Hi...:classic_cool:

     

    ! The naming of the components with "...1" at the end seems like placing it on the form. :classic_huh:

     

    Better...

    ....
    ....
    // ! not on the form
      IdSSLIOHandlerSocketOpenSSL := TIdSSLIOHandlerSocketOpenSSL.Create(nil);
      try
        IdSMTP := TIdSMTP.Create(nil);
        try
          IdMessage := TIdMessage.Create(nil);
          try
          //
    ....
    ....
    .....
          //  
          finally
            IdSSLIOHandlerSocketOpenSSL.Free;
          end;
        finally
          IdSMTP.Free;
        end;
      finally
        IdMessage.Free;
      end;	
      //
    ...
    end;

     

    or

     

    Placing on the form... and finish. I dont like it. :classic_wacko:


  3. Hi...:classic_cool:

    Quote

    Is this construct OK?

    ...No. It contains "with". :classic_tongue: "with" is like 90s...

    Why use many developers the "with"...old school? Everybody knows by now that there can be problems with this...TRect (example) or no resolution of variables during debugging. :classic_huh:

    • Like 2

  4. TExample = class  
    private
      FIndex : Integer;
    public
      constructor Create;
      property Index: Integer read FIndex write FIndex;
    end;
    ...
    
    constructor TExample.Create;
    begin
      FIndex := 999;
    end;

    :classic_cool:

     

    ...the same idea. :classic_tongue:


  5. Hi...:classic_cool:

    Quote
    
    UPDATE FICHADAS SET HASTA = ' + QuotedStr(FormatDateTime('dd-mm-yyyy HH:nn',FDMemTbCSV.FieldByName('Fecha').AsDateTime))

    ....please use every time SQL Parameters! :classic_huh:

     

    Qry.SQL.Text := 'select Blubb from Bla where Date = :BDA';
    Qry.ParamByName('BDA').AsDateTime := Now;

    See SQL Injection:

    https://en.wikipedia.org/wiki/SQL_injection

    https://de.wikipedia.org/wiki/SQL-Injection

     

    Then you will see that the DateTime problems will disappear. (Field in DataBase = DateTime) :classic_cool:

    • Like 1

  6. Hi...:classic_cool:

    i think ist confused. :classic_happy:

     

    Please show the code of your program...

     

    Principle:

    1: loop ( while not Database.Eof do ...from Query)

    2: create Mail complete with sender, receiver (from database "FieldByName"), body (the same)  ...

    procedure Send(Sender: string; Receiver: string; Body: string);

    3: send

     

    Quote

    allinonebutton.click

    Sorry...never use a click procedure...bad design. :classic_huh:

     

    Quote

    SMTP Component not ready

    In the loop use .Open / .Close of the ICS component...imho.


  7. Hi...

    Quote

    I'm not using any typical source control systems

    ...in japan they say "harakiri" to that. :classic_huh:

    Quote

    I feel like I need to switch to proper solution

    YES! :classic_tongue:

    Quote

    is Delphi IDE really ready to work with real source control?

    ...imho not. The features in the IDE are are too little. Better you use other tools like Tortoise for (GIT, SVN) ...what you like.

    https://tortoisegit.org/

     

    Tutorial: https://www.youtube.com/watch?v=N1KNw1tr47k

     

    • Like 1
    • Thanks 1
×