Page 1 of 1

Disabling TpgConnectDialog

Posted: Wed 09 Nov 2011 20:23
by asliakar
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.

Posted: Thu 10 Nov 2011 08:43
by AlexP
Hello,

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

TPgConnection.LoginPrompt := False;

Posted: Thu 10 Nov 2011 08:44
by syagrius
Hello asliakar,
Did you try to simply set LoginPrompt to False?

Syagrius

Posted: Thu 10 Nov 2011 21:33
by asliakar
I am grateful for both replies, thank you.