A connection string is a string version of the data link connection information that is required to open a database session.

You can use the Data Link Properties dialog box to create a connection string that uses OLE DB providers. You can manually create connection strings that use ODBC Drivers and save them as a .udl file. Use these files to specify database connections from TestStand (Database Options, Database Step Types, and Property Loader Step) and from the Database Viewer application.

In the Database Viewer, enter the connection strings in the New Data Link dialog box using the formats given below to establish a connection to the corresponding DBMS servers. Use the Save Data Link option to save the connection information as a .udl file.

This topic lists the connection string formats for the following DBMS servers and their supported providers:

  • Access
  • MySQL
  • Oracle
  • SQL Server
  • Sybase

Access

(32-bit TestStand)

OLE DB: Provider=Microsoft.Jet.OLEDB.4.0;Data Source=path to mdb/accdb file;Persist Security Info=False;

  • Example: Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\National Instruments\TestStand 2014\Components\Models\TestStandModels\Database\TestStand Results.mdb;Persist Security Info=False;

ODBC: Driver={Microsoft Access Driver (*.mdb)};DBQ=path to mdb/accdb file

  • Example: Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Program Files\National Instruments\TestStand 2014\Components\Models\TestStandModels\Database\TestStand Results.mdb

OLE DB: Provider=Microsoft.ACE.OLEDB.12.0;Data Source= path to mdb/accdb file;Persist Security Info=False;

  • Example: Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\National Instruments\TestStand 2014\Components\Models\TestStandModels\Database\TestStand Results.mdb;Persist Security Info=False;

ODBC: Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=path to mdb/accdb file

  • Example: Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=C:\Program Files\National Instruments\TestStand 2014\Components\Models\TestStandModels\Database\TestStand Results.mdb

MySQL

ODBC: Driver={MySQL ODBC 5.2 ANSI Driver};Server=<database server name>;Database=<schema name>;User=<user name>;Password=<user password>;Option=<options>;

  • Example: Driver={MySQL ODBC 5.2 ANSI Driver};Server=xfiles2010;Database=TSInsert;User=tester;Password=teststand;Option=259;
Note
  • You must install the MySQL ODBC Connector to use MySQL.
  • You should specify a default database for the connection. Failure to do so generally results in errors.

Oracle

OLE DB: Provider=OraOLEDB.Oracle.1;Password=<user password>;Persist Security Info=True;User ID=<user name>;Data Source=<data source name as configured in the Oracle client>;Database=<schema name>;

  • Example: Provider=OraOLEDB.Oracle.1;Password=teststand;Persist Security Info=True;User ID=tester;Data Source=ORCL;Database=tester;

ODBC: Driver={Oracle in OraClient11g_home1};Dbq=<data source name as configured in the Oracle client>;Uid=<user name>;Pwd=<user password>;

  • Example: Driver={Oracle in OraClient11g_home1};Dbq=ORCL;Uid=tester;Pwd=teststand;
Note   You must install the Oracle Database Client to use the Oracle providers.

SQL Server

OLE DB:

  • Using SQL Server Native Client: Provider=SQLNCLI10.1;Password=<user password>;Persist Security Info=True;User ID=<user name>;Initial Catalog=<catalog name>;Data Source=<database server name>;
    • Example: Provider=SQLNCLI10.1;Password=user;Persist Security Info=True;User ID=user;Initial Catalog=user;Data Source=XFILES2010;
  • Using Microsoft OLE DB Provider for SQL Server: Provider=SQLOLEDB.1;Persist Security Info=True;User ID=<user name>;Password=<user password>;Data Source=<database server name>;Initial Catalog==<catalog name>;
    • Example: Provider=SQLOLEDB.1;Persist Security Info=True;User ID=abc;Password=testing;Data Source= XFILES2010\TESTSTANDDB;Initial Catalog=test;
  • Using Integrated Security: Provider=SQLOLEDB.1; Integrated Security=SSPI;Data Source=<database server name>;Initial Catalog==<catalog name>;
    Note   This option is available in both the SQL Server Native Client provider and the Microsoft OLE DB Provider for SQL Server. Use this option to create connection strings that do not reveal user authentication information.
ODBC: Driver={SQL Server Native Client 10.0};Uid=<user name>;Pwd=<user password>;Server=<database server name>;Database=<database name>;
  • Example: Driver={SQL Server Native Client 10.0};Uid=user;Pwd=user;Server= XFILES2010\TESTSTANDDB;Database=test;

Sybase

OLE DB: Provider=SAOLEDB.10;ENG=<database engine name>;DBN=<database name>;User Id=<user name>;Password=<user password>;

  • Example: Provider=SAOLEDB.10;ENG=Diff_Db;DBN=Diff_Db;User Id=diff_tester;Password=sql;

ODBC: Driver={SQL Anywhere 10};UID=<user name>;DatabaseName=<database name>;EngineName=<database engine name>;AutoStop=YES;Integrated=NO;EncryptedPassword=3ff6c3114e;Debug=NO;DisableMultiRowFetch=NO;CommLinks='TCPIP{HOST=<database server name>;PORT=<port number for remote connections>}';Compress=NO

  • Example: Driver={SQL Anywhere 10};UID=user;DatabaseName=teststand;EngineName=teststand;AutoStop=YES;Integrated=NO;EncryptedPassword=3ff6c3114e;Debug=NO;DisableMultiRowFetch=NO;CommLinks='TCPIP{HOST=xfiles2000;PORT=4436}';Compress=NO