how to disable store Connection.connected on runtime

Discussion of open issues, suggestions and bugs regarding PgDAC (PostgreSQL Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
lauchuen
Posts: 37
Joined: Fri 07 Aug 2009 16:59

how to disable store Connection.connected on runtime

Post by lauchuen » Sun 20 May 2012 10:43

hi,
i have set the connection.connected = true (in object inspector) while using the design time, is that any way not to store this behavior during runtime or release mode? because i may connect to the server by using another server/port/username/password, currently connected twice.
the reason i ask here because this behavior already stored before FormCreate, so that i can't override it and ofcause i don't want to set connected = false everytime before i deploy....sometime really missed. thanks a lot.

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

Re: how to disable store Connection.connected on runtime

Post by AlexP » Mon 21 May 2012 07:39

Hello,

To avoid connection independently on the Connected property settings when running the application in design-time, you should set the PgConnection.Options.KeepDesignConnected property to False.

lauchuen
Posts: 37
Joined: Fri 07 Aug 2009 16:59

Re: how to disable store Connection.connected on runtime

Post by lauchuen » Mon 21 May 2012 07:50

thanks for reply.

i'm sorry that in my design mode, there're no KeepDesignConnected property. since the connection already establish (onBeforeConnect event) before FromCreate, so i will also setup connection twice.

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

Re: how to disable store Connection.connected on runtime

Post by AlexP » Mon 21 May 2012 08:16

Hello,

We have added this property to the published section, and it will be available for setting in design-time in the next release.

lauchuen
Posts: 37
Joined: Fri 07 Aug 2009 16:59

Re: how to disable store Connection.connected on runtime

Post by lauchuen » Mon 21 May 2012 08:19

great! any timeline for next release ?

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

Re: how to disable store Connection.connected on runtime

Post by AlexP » Mon 21 May 2012 08:33

Hello,

We plan to release the next version in mid-June.

lauchuen
Posts: 37
Joined: Fri 07 Aug 2009 16:59

Re: how to disable store Connection.connected on runtime

Post by lauchuen » Mon 21 May 2012 08:39

cool! waiting for next release!

btw, any planning to show more options in design mode too ? such as DisconnectedMode, LocalFailover, etc...

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

Re: how to disable store Connection.connected on runtime

Post by AlexP » Mon 21 May 2012 10:18

hello,

We will try to include the missing properties in the published section in the next version

lauchuen
Posts: 37
Joined: Fri 07 Aug 2009 16:59

Re: how to disable store Connection.connected on runtime

Post by lauchuen » Wed 23 May 2012 02:15

hello,

does pgTable/pgQuery have the same properties for not to StoreActive ?

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

Re: how to disable store Connection.connected on runtime

Post by AlexP » Wed 23 May 2012 08:23

hello,

Our DataSets don't have such property, if in the design time the DataSet was opened, it will be automatically opened in the run time too.

lauchuen
Posts: 37
Joined: Fri 07 Aug 2009 16:59

Re: how to disable store Connection.connected on runtime

Post by lauchuen » Wed 23 May 2012 08:32

hi,
but is that possible to call Dataset.Close on FormCreate event ? to avoid Open, Close, Open ?

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

Re: how to disable store Connection.connected on runtime

Post by AlexP » Wed 23 May 2012 11:25

hello,

If the DataSet is opened in design-time, it will be opened in run-time before the FormCreate event occurs, therefore the DataSet will be open anyway.

lauchuen
Posts: 37
Joined: Fri 07 Aug 2009 16:59

Re: how to disable store Connection.connected on runtime

Post by lauchuen » Wed 23 May 2012 11:56

any suggestion ? (except close the dataset everytime before deploy)

thx

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

Re: how to disable store Connection.connected on runtime

Post by AlexP » Thu 24 May 2012 08:14

Hello,

Unfortunately, there are no methods for inhibit of DataSet opening in run-time, that was opened in design-time. You should either close it in design-time or call the close method in run-time

lauchuen
Posts: 37
Joined: Fri 07 Aug 2009 16:59

Re: how to disable store Connection.connected on runtime

Post by lauchuen » Thu 24 May 2012 08:17

noted, thanks for helping.

Post Reply