1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-29 22:27:42 +02:00
Files
OpenIntegrations/docs/en/examples/MSSQL/EnsureTable.txt

22 lines
908 B
Plaintext
Raw Normal View History

2025-07-10 19:46:33 +03:00
 Address = "127.0.0.1";
Login = "SA";
Password = "12we...";
Base = "testbase1";
Table = "testtable";
2025-09-01 14:51:24 +03:00
TLSSettings = OPI_MSSQL.GetTLSSettings(True);
2025-07-10 19:46:33 +03:00
ConnectionString = OPI_MSSQL.GenerateConnectionString(Address, Base, Login, Password);
ColoumnsStruct = New Structure;
ColoumnsStruct.Insert("smallint_field" , "smallint");
ColoumnsStruct.Insert("double_field" , "real");
ColoumnsStruct.Insert("bigint_field" , "bigint");
ColoumnsStruct.Insert("custom_field" , "nvarchar");
// When using the connection string, a new connection is initialised,
// which will be closed after the function is executed.
// If several operations are performed, it is desirable to use one connection,
// previously created by the CreateConnection function()
Result = OPI_MSSQL.EnsureTable(Table, ColoumnsStruct, ConnectionString, TLSSettings);