ODBC Driver for NetSuite

Connection String Parameters - ODBC Driver for NetSuite



NetSuite ODBC Connection String Parameters

The following table lists the connection string parameters for NetSuite.

Parameter Description

Account ID

Use the parameter, along with your User ID and Password, to authenticate yourself to NetSuite. For information on getting an Account ID, see Obtaining Account ID and Application ID.

Account Time Zone

Use the parameter to specify the local time zone for your account by selecting an appropriate option in the menu.

API Version

This parameter specifies the API protocol version used for the connection. The following parameter values are assigned by default depending on the selected authentication type:

  • Ver1 is the default value for the Basic or Token-Based authentication type.
  • Ver2 is the default value for the OAuth authentication type.

Authentication

Use the option to specify the authentication type: Basic, Token-Based, or OAuth. The default value is Token-Based.

Basic Authentication

Application ID

Use the parameter to specify your User ID, Password, and Application ID. For information on obtaining a NetSuite Application ID, see Obtaining Account ID and Application ID.

Password

Use the parameter to specify the password for the User ID you are using.

Role ID

Use the parameter to specify your Role ID, which is the InternalId of a role that is used to log in to NetSuite. If no Role ID is specified, the user's default role will be used. A Role ID may be obtained by selecting Setup > Integration > Manage Integrations > New in your NetSuite account.

User ID

Use the parameter to specify your unique User ID when logging in.

Token-Based Authentication

Consumer Key

Use the parameter to specify a Consumer Key and Consumer Secret, which are private keys generated when creating an app in a NetSuite account. For instructions, see Connecting to NetSuite Using Token-Based Authentication.

Consumer Secret

Token

Use the option to specify your Token ID.

Token Secret

Use the option to specify your Token Secret.

OAuth

Client ID

Use the parameter to specify a Client ID and Client Secret, which are private keys generated when creating an app in a NetSuite account. For instructions, see Connecting to NetSuite Using OAuth 2.0 Authentication.

Client Secret

Refresh Token

Use the parameter to indicate the refresh token that authorizes access to your NetSuite data. To save your refresh token in DSN Settings, select the Save Token checkbox.

Proxy Settings

Proxy Server

The proxy hostname or IP address.

Proxy Port

The port number used to connect to a proxy server.

Proxy User ID

The proxy username.

Proxy Password

The proxy password.

Advanced Settings

Allow NULL strings

To retrieve metadata, not all parameters, according to MSDN, can accept a null value. If NULL, the driver should return an error. But some 3rd-party tools pass NULL to the parameters. These options should be enabled for compatibility with such tools.

Empty strings as NULL

Cache Metadata

This is a configurable parameter, that allows caching and storing metadata in a temporary database. The parameter settings specify the frequency of resetting cached metadata, ranging from 1 hour...to 1 month.

  • False - The metadata caching is disabled.
  • 1 Hour - Cached metadata is reset one time per hour.
  • 1 Day - Cached metadata is reset once a day (i.e., every 24 hours).
  • 1 Month - Cached metadata is reset once per month.
  • True - Metadata caching won't reset until the driver is unloaded.

Normalize DB Names

Replaces the . character in column names with the _ character. Enable the option for third-party tools that don't support the . character in column names.

Connection Timeout

The time (in seconds) to wait for a connection to open before terminating an attempt. The default value is 60.

QueryTimeout

This is the time to wait for a query execution result before terminating and generating an error.

UTC Dates

Specifies whether all the datetime values retrieved from the data source are returned as UTC values or converted to local time and whether the date values specified on the application side (e.g., in SQL statements) are considered UTC or local. The default value is false.

ODBC Behavior

Used to set the behavior corresponding to the ODBC specification version that a third-party tool expects. The behavior of the ODBC driver can be changed by setting a value for the SQL_ATTR_ODBC_VERSION attribute by calling the SQLSetEnvAttr function. Some third-party tools expect the driver to exhibit ODBC 2.x behavior, but they forget to call SQLSetEnvAttr with the specified version or pass an incorrect value there. In this case, the required behavior can be explicitly specified in the Connection String by setting the ODBC Behavior parameter. The possible values are:

  • Default - Default ODBC behavior determined by a third-party tool.
  • Ver 2.x - ODBC 2.x behavior is explicitly set.
  • Ver 3.x - ODBC 3.x behavior is explicitly set.

Local SQL Engine

Upon disabling the parameter, the SQL queries will be sent and processed in NetSuite as is. Disabling the parameter will improve performance when executing queries with LIMIT from tables with vast amounts of entries. However, disabling the parameter will limit the SQL query syntax; thus, some queries might not be executed.

RegionalNumberSettings

Enables the use of local regional settings when converting numbers to strings.

RegionalDateTimeSettings

Enables the use of local regional settings when converting dates and times to strings.

ReturnForeignKeys

Use the option to specify whether the driver must return foreign keys. Retrieving metadata about foreign key constraints is a time-consuming operation; many third-party tools request foreign key metadata even when they do not actually need this information. Note that enabling the option may degrade the performance of data access operations. The default value is False.

String Types

Sets the string value types returned by the driver as Default, Ansi, or Unicode.

  • Default - The driver defines the string types.
  • Ansi - All string types will be returned as SQL_CHAR, SQL_VARCHAR, and SQL_LONGVARCHAR.
  • Unicode - All string types will be returned as SQL_WCHAR, SQL_WVARCHAR, and SQL_WLONGVARCHAR.

The parameter value should be changed if any third-party tool supports only Ansi string types or Unicode ones.

Custom Tables

Allows accessing a custom table.

Custom Fields

Allows accessing custom table fields.

Custom Lists

Allows accessing custom lists.

NetSuite ODBC Connection String sample

DRIVER={Devart ODBC Driver for NetSuite};User [email protected];Password=da85au;Account ID=DTDSVR1809345;Application ID=4B7E39KC-S276-5647-5D88-678GP7972957

DRIVER={Devart ODBC Driver for NetSuite};User [email protected];Password=da85au;Account ID=DTDSVR1809345;Application ID=4B7E39KC-S276-5647-5D88-678GP7972957

DRIVER={Devart ODBC Driver for NetSuite};Authentication Type=TokenBased;User ID=my_user_id;Account Id=my_account_id;Role Id=my_role_id;Application Id=my_application_id;Consumer Key=my_consumer_id;Consumer Secret=my_consumer_secret;Token Id=my_token_id;Token Secret=my_token_secret

© 2016-2025 Devart. All Rights Reserved. Request Support ODBC Forum Provide Feedback