Connecting Using a Connection String

If you want to use a connection string to connect to NetSuite, or if your application requires it, you must specify either a DSN (data source name) or a DSN-less connection in the string.

A DSN connection string tells the driver where to find the default connection information. Optionally, you may specify attribute=value pairs in the connection string to override the default values stored in the data source.

DSN connection

The DSN connection string has the form:

          DSN=data_source_name[;attribute=value[;attribute=value]...] 

        
Note:

The data source name (DSN) depends on the driver configuration. When you install the SuiteAnalytics Connect driver, the data source name is set to NetSuite.

For example, a connection string may look like the following. Only the data source name (DSN), user name (UID), and password (PWD) are required:

          DSN=NetSuite;UID=test@netsuite.com;PWD=<password> 

        

To learn your data source name, check the values available on the SuiteAnalytics Connect Driver Download page under Your Configuration. You can access the SuiteAnalytics Connect Driver Download page using the Set Up Analytics Connect link in the Settings portlet when you are logged in to NetSuite. For more information, see Finding Your Settings Portlet.

For details on how to configure the ODBC Data Source on Windows, see Configuring the ODBC Data Source on Windows.

DSN-less connection

The DSN-less connection string specifies a driver instead of a data source name. All connection information must be entered in the connection string because there is no data source storing the information.

The DSN-less connection string has the form:

          DRIVER=driver_name[;attribute=value[;attribute=value]...] 

        
Note:

Empty string is the default value for attributes that use a string value unless otherwise noted.

A DSN-less connection string must provide all necessary connection information. Depending on your operating system, you must set a different value of the trust store parameter to enable the authentication with server certificates. The following examples show the connection string for the Windows and Linux operating systems:

Note:

To include the required attribute values, see the following:

The <ServiceHost>, <accountID>, and <roleID> variables represent your host name, account ID, and role ID. The values are available on the SuiteAnalytics Connect Driver Download page under Your Configuration. You can access the SuiteAnalytics Connect Driver Download page using the Set Up Analytics Connect link in the Settings portlet when you are logged in to NetSuite. For more information, see Finding Your Settings Portlet.

For more information, see Configuring the ODBC Data Source on Windows and Configuring the ODBC Data Source on Linux.

Note:

Driver names may vary, depending on whether you use a 32-bit or the 64-bit version of the driver.

Related Topics

Accessing the Connect Service Using an ODBC Driver
Prerequisites
Downloading and Installing the ODBC Driver for Windows
Downloading and Installing the ODBC Driver for Linux
Configuring the ODBC Driver
Connection Attributes
Authentication Using Server Certificates for ODBC
Upgrading an ODBC Driver
Accessing the Connect Service Using Microsoft Excel

General Notices