Home > Mobile >  Delphi, When a datamodule loads I like to prevent the TFDConnector from connecting if I mistakenly h
Delphi, When a datamodule loads I like to prevent the TFDConnector from connecting if I mistakenly h

Time:12-22

It often happens, to me, that after testing and making a build while I forget to check the activate property first. Then when I install the program on a different system an exception occurs due to failed connection. It's really annoying.

I've searched for a solution for a long time but it looks like it is impossible without making a new connection component inherited from TFDConnection. I don't want to do that and maybe someone here knows a simple way to get around this problem.

CodePudding user response:

Check out the property ConnectedStoredUsage in TFDConnection. That controls how to use the Connected property value saved to the DFM.

So for your need, you can uncheck auRunTime.

For more info on ConnectedStoredUsage, see the DocWiki.

  • Related