1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-27 22:18:36 +02:00
Files
OpenIntegrations/docs/en/examples/PostgreSQL/CreateConnection.txt

22 lines
686 B
Plaintext
Raw Normal View History

2025-06-29 14:35:33 +03:00
 Address = "127.0.0.1";
2025-02-13 21:31:59 +03:00
Login = "bayselonarrend";
2025-06-29 14:35:33 +03:00
Password = "12we...";
2025-02-13 21:31:59 +03:00
Base = "postgres";
ConnectionString = OPI_PostgreSQL.GenerateConnectionString(Address, Base, Login, Password);
Result = OPI_PostgreSQL.CreateConnection(ConnectionString);
2025-02-14 15:29:42 +03:00
OPI_PostgreSQL.CloseConnection(Result);
2025-03-11 21:09:03 +03:00
// With TLS
2025-06-29 14:35:33 +03:00
Address = "127.0.0.1";
2025-03-11 21:09:03 +03:00
Port = "5433";
ConnectionString = OPI_PostgreSQL.GenerateConnectionString(Address, Base, Login, Password, Port);
2025-06-27 14:27:03 +03:00
TLSSettings = OPI_PostgreSQL.GetTlsSettings(True);
2025-03-11 21:09:03 +03:00
Result = OPI_PostgreSQL.CreateConnection(ConnectionString, TLSSettings);
OPI_PostgreSQL.CloseConnection(Result);