TUniConnection.Connected causing problem

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
pincopallino
Posts: 16
Joined: Wed 03 Oct 2012 19:52

TUniConnection.Connected causing problem

Post by pincopallino » Sat 04 Jan 2014 18:47

Hi all,
a little annoyance with TUniConnection.Connected and a Firebird embedded database.
Because of the limit of only one connection when I forget the database connected at design time (the connection is automatic in a lot of (good) cases) when the program start it fire a couple of errors and I need to continue, disconnect the database and recompile.
Doing it some times a day is unconfortable.

I tried to do something in the BeforeCreate event but nothing is working because raising an exception in the Form loader cause the entire application to abort!

The only thing would be to change the declaration of the Connected property to not save their value in the form.
Or someone knows an other solutions?
Thanks

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: TUniConnection.Connected causing problem

Post by AlexP » Thu 09 Jan 2014 13:10

Hello,

In order to make a connection set in design-time not to open in runtime, you should set the KeepDesignConnected property to False:

Code: Select all

  UniConnection1.Options.KeepDesignConnected := False;

Post Reply