Disabling TpgConnectDialog

Discussion of open issues, suggestions and bugs regarding PgDAC (PostgreSQL Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
asliakar
Posts: 6
Joined: Wed 07 Sep 2011 18:08

Disabling TpgConnectDialog

Post by asliakar » Wed 09 Nov 2011 20:23

Hello,

I have a TPgConnection. I set the properties required to connect (port, password, dbname...) But still, when i set the TPgConnection.connect property to true, it shows a default TPgConnectDialog, where all the properties are set but not the password. When I set all the properties for connection, I don't want any user interaction in the program.

How can I disable this property and prevent a connect dialog show after setting all the properties? I need a silent connection which no questions are asked.

Thank you.

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

Post by AlexP » Thu 10 Nov 2011 08:43

Hello,

To turn opening of Connection Dialog on connecting off, you need to set the LoginPrompt property to False:

TPgConnection.LoginPrompt := False;

syagrius
Posts: 10
Joined: Sat 28 Feb 2009 13:45

Post by syagrius » Thu 10 Nov 2011 08:44

Hello asliakar,
Did you try to simply set LoginPrompt to False?

Syagrius

asliakar
Posts: 6
Joined: Wed 07 Sep 2011 18:08

Post by asliakar » Thu 10 Nov 2011 21:33

I am grateful for both replies, thank you.

Post Reply