You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-11-27 22:18:36 +02:00
Main build (Jenkins)
This commit is contained in:
10
docs/en/examples/MSSQL/CloseConnection.txt
vendored
Normal file
10
docs/en/examples/MSSQL/CloseConnection.txt
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
Address = "127.0.0.1";
|
||||
Login = "SA";
|
||||
Password = "12we...";
|
||||
Port = 1434;
|
||||
|
||||
ConnectionString = OPI_MSSQL.GenerateConnectionString(Address, , Login, Password);
|
||||
TLSSettings = OPI_MSSQL.GetTlsSettings(True);
|
||||
|
||||
Connection = OPI_MSSQL.CreateConnection(ConnectionString, TLSSettings);
|
||||
Result = OPI_MSSQL.CloseConnection(Connection);
|
||||
19
docs/en/examples/MSSQL/CreateConnection.txt
vendored
19
docs/en/examples/MSSQL/CreateConnection.txt
vendored
@@ -1,20 +1,9 @@
|
||||
Address = FunctionParameters["PG_IP"];
|
||||
Login = "bayselonarrend";
|
||||
Password = FunctionParameters["PG_Password"];
|
||||
Address = "127.0.0.1";
|
||||
Login = "SA";
|
||||
Password = "12we...";
|
||||
Port = 1434;
|
||||
|
||||
ConnectionString = OPI_MSSQL.GenerateConnectionString(Address, , Login, Password);
|
||||
Result = OPI_MSSQL.CreateConnection(ConnectionString);
|
||||
|
||||
OPI_MSSQL.CloseConnection(Result);
|
||||
|
||||
// With TLS
|
||||
|
||||
Address = FunctionParameters["PG_IP"];
|
||||
Port = "1434";
|
||||
|
||||
ConnectionString = OPI_MSSQL.GenerateConnectionString(Address, , Login, Password, Port);
|
||||
TLSSettings = OPI_MSSQL.GetTlsSettings(True);
|
||||
|
||||
Result = OPI_MSSQL.CreateConnection(ConnectionString, TLSSettings);
|
||||
|
||||
OPI_MSSQL.CloseConnection(Result);
|
||||
|
||||
59
docs/en/examples/MSSQL/ExecuteSQLQuery.txt
vendored
Normal file
59
docs/en/examples/MSSQL/ExecuteSQLQuery.txt
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
Image = "https://hut.openintegrations.dev/test_data/picture.jpg";
|
||||
OPI_TypeConversion.GetBinaryData(Image); // Image - Type: BinaryData
|
||||
|
||||
Address = "127.0.0.1";
|
||||
Login = "SA";
|
||||
Password = "12we...";
|
||||
Base = "test_data";
|
||||
|
||||
ConnectionString = OPI_MSSQL.GenerateConnectionString(Address, Base, Login, Password);
|
||||
Connection = OPI_MSSQL.CreateConnection(ConnectionString);
|
||||
|
||||
// CREATE
|
||||
|
||||
QueryText = "
|
||||
|CREATE TABLE test_table (
|
||||
|id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
|name VARCHAR(255),
|
||||
|age INT,
|
||||
|salary DOUBLE,
|
||||
|amount FLOAT,
|
||||
|type TINYINT UNSIGNED,
|
||||
|date DATE,
|
||||
|time TIME,
|
||||
|data MEDIUMBLOB
|
||||
|);";
|
||||
|
||||
Result = OPI_MSSQL.ExecuteSQLQuery(QueryText, , , Connection);
|
||||
|
||||
// INSERT with parameters
|
||||
|
||||
QueryText = "
|
||||
|INSERT INTO test_table (name, age, salary, amount, type, date, time, data)
|
||||
|VALUES (?, ?, ?, ?, ?, ?, ?, ?);";
|
||||
|
||||
ParameterArray = New Array;
|
||||
ParameterArray.Add(New Structure("TEXT" , "Vitaly"));
|
||||
ParameterArray.Add(New Structure("INT" , 25));
|
||||
ParameterArray.Add(New Structure("DOUBLE", 1000.12));
|
||||
ParameterArray.Add(New Structure("FLOAT" , 1000.12));
|
||||
ParameterArray.Add(New Structure("UINT" , 1));
|
||||
ParameterArray.Add(New Structure("DATE" , OPI_Tools.GetCurrentDate()));
|
||||
ParameterArray.Add(New Structure("TIME" , OPI_Tools.GetCurrentDate()));
|
||||
ParameterArray.Add(New Structure("BYTES" , Image));
|
||||
|
||||
Result = OPI_MSSQL.ExecuteSQLQuery(QueryText, ParameterArray, , Connection);
|
||||
|
||||
// SELECT (The result of this query is shown in the Result block)
|
||||
|
||||
QueryText = "SELECT name, age, salary, amount, type, date, time, data FROM test_table;";
|
||||
|
||||
Result = OPI_MSSQL.ExecuteSQLQuery(QueryText, , , Connection);
|
||||
|
||||
// SQL query from file
|
||||
|
||||
SQLFile = "https://hut.openintegrations.dev/test_data/TEST_DATA2.sql"; // Binary Data, URL or path to file
|
||||
|
||||
Result = OPI_MSSQL.ExecuteSQLQuery(SQLFile, , , Connection);
|
||||
|
||||
Closing = OPI_MSSQL.CloseConnection(Connection);
|
||||
@@ -1,6 +1,6 @@
|
||||
Address = FunctionParameters["PG_IP"];
|
||||
Address = "127.0.0.1";
|
||||
Login = "bayselonarrend";
|
||||
Password = FunctionParameters["PG_Password"];
|
||||
Password = "12we...";
|
||||
Base = "";
|
||||
|
||||
Result = OPI_MSSQL.GenerateConnectionString(Address, Base, Login, Password);
|
||||
|
||||
1
docs/en/examples/MSSQL/GetTlsSettings.txt
vendored
Normal file
1
docs/en/examples/MSSQL/GetTlsSettings.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Result = OPI_MSSQL.GetTlsSettings(True);
|
||||
10
docs/en/examples/MSSQL/IsConnector.txt
vendored
Normal file
10
docs/en/examples/MSSQL/IsConnector.txt
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
Address = "127.0.0.1";
|
||||
Login = "SA";
|
||||
Password = "12we...";
|
||||
|
||||
ConnectionString = OPI_MSSQL.GenerateConnectionString(Address, , Login, Password);
|
||||
|
||||
Connection = OPI_MSSQL.CreateConnection(ConnectionString);
|
||||
Result = OPI_MSSQL.IsConnector(Connection);
|
||||
|
||||
OPI_MSSQL.CloseConnection(Result);
|
||||
Reference in New Issue
Block a user