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);
|