Page 1 of 2

how to disable store Connection.connected on runtime

Posted: Sun 20 May 2012 10:43
by lauchuen
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.

Re: how to disable store Connection.connected on runtime

Posted: Mon 21 May 2012 07:39
by AlexP
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.

Re: how to disable store Connection.connected on runtime

Posted: Mon 21 May 2012 07:50
by lauchuen
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.

Re: how to disable store Connection.connected on runtime

Posted: Mon 21 May 2012 08:16
by AlexP
Hello,

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

Re: how to disable store Connection.connected on runtime

Posted: Mon 21 May 2012 08:19
by lauchuen
great! any timeline for next release ?

Re: how to disable store Connection.connected on runtime

Posted: Mon 21 May 2012 08:33
by AlexP
Hello,

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

Re: how to disable store Connection.connected on runtime

Posted: Mon 21 May 2012 08:39
by lauchuen
cool! waiting for next release!

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

Re: how to disable store Connection.connected on runtime

Posted: Mon 21 May 2012 10:18
by AlexP
hello,

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

Re: how to disable store Connection.connected on runtime

Posted: Wed 23 May 2012 02:15
by lauchuen
hello,

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

Re: how to disable store Connection.connected on runtime

Posted: Wed 23 May 2012 08:23
by AlexP
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.

Re: how to disable store Connection.connected on runtime

Posted: Wed 23 May 2012 08:32
by lauchuen
hi,
but is that possible to call Dataset.Close on FormCreate event ? to avoid Open, Close, Open ?

Re: how to disable store Connection.connected on runtime

Posted: Wed 23 May 2012 11:25
by AlexP
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.

Re: how to disable store Connection.connected on runtime

Posted: Wed 23 May 2012 11:56
by lauchuen
any suggestion ? (except close the dataset everytime before deploy)

thx

Re: how to disable store Connection.connected on runtime

Posted: Thu 24 May 2012 08:14
by AlexP
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

Re: how to disable store Connection.connected on runtime

Posted: Thu 24 May 2012 08:17
by lauchuen
noted, thanks for helping.