I am using Delphi 10.2, UniDAC 7.1.3, PostgreSQL 10.1, target is Win32 executable.
I would like to connect to PostgreSQL server without making any database connection. After establishing connection, I will use TUniScript to create a database on the server.
Using an empty database name results to "database "test" not exists exception". Example code is as follows:
Code: Select all
UniConnection1.Close();
UniConnection1.ProviderName := 'PostgreSQL';
UniConnection1.Server := 'localhost';
UniConnection1.Port := 0;
UniConnection1.Database := EmptyStr;
UniConnection1.Username := 'test'; // there is indeed a user named test in database system
UniConnection1.Password := 'test'; // test user's password is indeed test in database system
UniConnection1.Connect();