Setting the OAuth2Token Attribute
When you install or update your Connect driver, the OAuth2Token
attribute is not included in the default driver or data source name (DSN) attributes. To access the NetSuite2.com data source with OAuth 2.0 you must update the connection attributes to add the OAuth2Token
attribute. Depending on the driver that you use, there are different ways to edit the connection attributes.
ODBC drivers
If you use a connection string, you must update your connection string to add the OAuth2Token
attribute and place it at the end of the list of CustomProperties
attributes. For more information about how to include the attribute, see Connecting Using a Connection String and Connection Attributes.
Using a DSN-less connection string for ODBC drivers on Windows is the preferred option. If you choose to use a DSN connection instead, you must add the OAuth2Token
attribute using the Windows Registry Editor application. The access token expires after one hour, and you need to update the access token each time it has expired. Therefore, the preferred option is using a DSN-less connection string.
JDBC drivers
You must update your connection string to add the OAuth2Token
attribute and place it at the end of the list of CustomProperties
attributes. For more information, see JDBC Connection Properties.
ADO.NET drivers
You must update your connection string to add the OAuth2Token
attribute and place it at the end of the list of CustomProperties
attributes. For more information about using connection strings with the ADO.NET driver, see ADO.NET Connection Options.