Hi,
the GetServerList procedure, of TUniConnectDialog does not list PostgreSQL Linux servers, only Windows servers.
Why?
If I try execute GetDatabaseNames of TUniConnection with users other than "postgres" the following error occurs:
---------------------------
Project1
---------------------------
Cannot connect to database
---------------------------
OK
---------------------------
UniConnection.ProviderName := 'PostgreSQL';
UniConnection.Server := 'ServerName';
UniConnection.Username := 'test_user';
UniConnection.Password := '123456';
UniConnection.GetDatabaseNames(ListDataBase);
How can I fix this problem?
Thanks!
PostgreSQL - GetServerList and GetDatabaseNames
-
eduardomendes
- Posts: 28
- Joined: Wed 24 Feb 2010 14:08
Hello,
This problem is connected with the fact that we are using the standard WinApi function to look for servers, and this function cannot see Linux servers.
But the GetDatabaseNames method works correctly.
I have created a new "simple" user like
CREATE ROLE test LOGIN
NOINHERIT
VALID UNTIL 'infinity';
and I got a list of avaliable databases without any errors using the GetDatabaseNames method.
This problem is connected with the fact that we are using the standard WinApi function to look for servers, and this function cannot see Linux servers.
But the GetDatabaseNames method works correctly.
I have created a new "simple" user like
CREATE ROLE test LOGIN
NOINHERIT
VALID UNTIL 'infinity';
and I got a list of avaliable databases without any errors using the GetDatabaseNames method.
-
eduardomendes
- Posts: 28
- Joined: Wed 24 Feb 2010 14:08