Jump to content

haentschman

Members
  • Content Count

    213
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by haentschman

  1. Hi... key points: 1. DBGrid -> TDataSource -> TQuery 2. SQL in Query Query.SQl.Text := 'select Bla from Bubb where Bla = :PAR' Query.ParamByName('PAR').AsString := 'Test'; Query.Open; * if you can...dont use LIKE. The database indizies are not used. * always work with parameters! See: https://en.wikipedia.org/wiki/SQL_injection ...finish.
  2. haentschman

    Automatic spacing of buttons on a panel??

    Hi... ...how about a TGridPanel? https://edn.embarcadero.com/article/33421
  3. haentschman

    Database in Delphi

    Hi... ...wow. ...better. Questions: We know IBConsole and IBDatabase ...but which database you use? Firebird or Interbase? Tools: Admintool: https://dbeaver.io/ ...better than console. Tip: Never use T???Table...only T???Query and SQL!
  4. haentschman

    Creating and Freeing components on-the-fly..

    Free is enough. (for components) If you have your own objects in use and you check with Assign, then FreeAndNil is correct. Otherwise Free is also enough here.
  5. haentschman

    Creating and Freeing components on-the-fly..

    Hi... ! The naming of the components with "...1" at the end seems like placing it on the form. 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.
  6. haentschman

    caFree & ,Free??

    Hi... ...No. It contains "with". "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.
  7. haentschman

    Transform string into TDateTime

    [OT] Imho is the reason the "with"... With ist like 90's. [/OT]
  8. haentschman

    Default value

    TExample = class private FIndex : Integer; public constructor Create; property Index: Integer read FIndex write FIndex; end; ... constructor TExample.Create; begin FIndex := 999; end; ...the same idea.
  9. I would like to have it in german...
  10. haentschman

    Delphi with T SQL

    Hi... The question is...why you want the imho old TSQL instead of FireDAC, UNIDAC, Zeos?
  11. haentschman

    Delphi 10.4.1 and the IDE FIx Pack

    Hi... Question to Andreas: We can expect it?...sometime. Great Work...Thanks.
  12. haentschman

    Removing breakpoints

    Hi... ...look here (in german):
  13. haentschman

    TFDQuery - Query all databases on a server

    Hi... Imho is the editor in the MSSQL studio a script...not a query. How about TFDScript instead of TFDQery? http://docwiki.embarcadero.com/Libraries/Seattle/en/FireDAC.Comp.Script.TFDScript ' + quotename(name,'''') + ' also in scripts you can use parameters
  14. haentschman

    git - do you 'pull' before/after switching branches?

    Hi... which you use?
  15. haentschman

    Firedac - Sqlite - DateTime field

    Hi... ....please use every time SQL Parameters! 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)
  16. haentschman

    Delphi 10.4 (.1) Welcome Page

    Hi... the solution ist here... https://www.danielwolf.eu/blog/2015/1668-meine-vorstellung-einer-willkommens-seite ...slim and effective
  17. haentschman

    Securing your data over time

    ...yes. What if your house burns down? All data that cannot be restored, especially the Delphi projects, must be transferred to the data center outside the house. (Webspace/Webserver)
  18. haentschman

    Moving Projects Folder

    Hi... Is this what you mean? ...the base folder for new projects? ...in german
  19. Hi... i think ist confused. 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 Sorry...never use a click procedure...bad design. In the loop use .Open / .Close of the ICS component...imho.
  20. this is named: learning by doing.
  21. Hi... correspondingly: one dproj -> one repository Branches in the repository: Picture: master: unused release: new branch development: new branch #xxx: new branch for every feature -> then merge to development
  22. haentschman

    How do you organize developing new features in big projects?

    Hi... Even if you are the only developer, you should have a ticket system. You can use it to create small "building blocks" for the project. Think of it as a "to-do" list, where you document which changes have been made for the one ticket. A small one is Mantis. https://www.mantisbt.org/
  23. Hi... Last but not least...TortoiseXXX has in the Explorer overlayicons. I love it. You can see, which files/folders are modified. Especially the ones you haven't changed yourself...dproj.
  24. ...see TortoiseGIT ...example before. https://www.google.de/search?q=tortoise+git&source=lnms&tbm=isch&sa=X&ved=2ahUKEwjU-Luqh-HqAhUmNOwKHYBpDDgQ_AUoAXoECBcQAw&biw=1867&bih=964
×