Jump to: navigation, search

Changes


UBIK Console

5 bytes added, 13:37, 16 April 2018
== Example using Script file ==
In order to execute a C# script file using the {{UBIK}} Console you need execute the UBIK.Console.exe using the ''-cmdfile'' parameter. If you add the ''-connectionstring'' parameter as shown in the example the console will instantiate UBIKEnvironmentConnection variable called ''ubikEnvironmentConnection''. This variable is then accessible in your script and can be used.
<source lang="xmlpowershell">
UBIK.Console.exe -cmdfile "\\PathToScript\script.txt" -connectionstring "Data Source = ...; Initial Catalog = ...; User ID = ...; Password = ..."
</source>
The following script code is taken from the example script file and shows how to work with {{UBIK}} Console via script file.
<source = lang"csharp">
#r "C:\\Users\\cle\\Documents\\Dev\\UBIK.Server\\Branches\\2.6\\UBIK.Console\\bin\\Debug\\DBTool.exe"
System.Data.SqlClient.SqlConnectionStringBuilder scsb = new System.Data.SqlClient.SqlConnectionStringBuilder(ubikEnvironmentConnection.ConnectionString);
182
edits