All default connections set up within SmartConnect are added as variables in all scripting windows. This allows them to be used in database connections etc without showing user credentials to all users who can view the related scripts.
The following default connections may be used within scripts:
|•||MSSQL Defaults - variable created as _SQLDEF_<mssql default name>|
|•||ODBC Data Source defaults - variable created as _GODBC_<odbc default name>|
|•||OLEDB Data Source defaults - variable created as _GOLEDB_<oledb default name>|
|•||GP Query data source defaults - variable created as _MSGP_<gp default name>|
e.g. A script to connect to a MSSQL database.
using(SqlConnection con = new SqlConnection("_SQLDEF_TESTSQL"))