Page 1 of 1

TUniConnection.Connected causing problem

Posted: Sat 04 Jan 2014 18:47
by pincopallino
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

Re: TUniConnection.Connected causing problem

Posted: Thu 09 Jan 2014 13:10
by AlexP
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;