Jump to content

weirdo12

Members
  • Content Count

    156
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by weirdo12


  1. A TFDEventAlerter creates it's own new connection when you set the Connection property. So yes, you need to keep track of the TFDEventAlerter objects you create and disable them if the connection is lost. I found it necessary to set Active to false and clear the Connection property.

     

    Quote

    Set Connection to the component that establishes a connection to the DBMS. Because event alerter is using the connection in a background thread, it will use this connection as a template to create a new internal instance of connection to the DBMS.

     

    https://docwiki.embarcadero.com/Libraries/Athens/en/FireDAC.Comp.Client.TFDCustomEventAlerter.Connection

    • Like 1

  2. 14 minutes ago, tobenschain said:

    I am unable to delete a TFDTable after creating it. I tried Close and Disconnect.

     

    What database are you using? Show us  the code you are using that is not working as expected along with an explanation of what you think should be happening.


  3. 18 hours ago, Mark Williams said:

    You're a genius. I'm an idiot. Why didn't I think of COALESCE. Thanks

    😄 So just supply the current value when the value doesn't change. I do like the statement that uses COALESCE because it makes it very obvious that that is what is happening.

     

    Are you targeting a specific database server?


  4. They are retooling the C++ compiler chain. I get the impression that C++ is becoming more important - not less - even if it might seem like a 2 steps forward, one step back (for the moment). My gut feeling is the future has never been brighter for C++Builder.

    • Like 1
    • Thanks 1

  5. 3 hours ago, Columbo said:

    dinoImage.Picture.LoadFromFile('D:\Delphi_11_Community\MyProjects\Dinobase\dino_images\'+ sName + '.jpg');

     

    You can build your file name like this as well:

     

    var  file_name : String;

     

    file_name := TPath.Combine('D:\Delphi_11_Community\MyProjects\Dinobase\dino_images', sName);

    file_name := TPath.ChangeExtension(file_name, "jpg");

     

    dinoImage.Picture.LoadFromFile(file_name);

     

     


  6. Drop a TFDQuery component on your form. If it's the first one, it will be named FDQuery1. Set FDQuery1.Connection property to the TFDConnection you use to connect to the SQLite database.

     

    Then, in your code, replace Query. with FDQuery1.

×