ODBC Driver for Google Sheets

Connection String Parameters - ODBC Driver for Google Sheets



ODBC Driver for Google Sheets ODBC Connection String Parameters

The following table lists the connection string parameters for ODBC Driver for Google Sheets.

Parameter Description

Refresh Token

The refresh token that authorizes the driver to access your ODBC Driver for Google Sheets data.

Spreadsheet

The name of the currently active google spreadsheet. You can use only one spreadsheet within one connection.

Spreadsheet Id

The unique id of the active spreadsheet consisting of the specific string of characters.

Proxy Settings

Proxy Server

The proxy hostname or IP address.

Port

The proxy port.

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

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 whey they do not actually need this information. Note that enabling the option may degrade performance of data access operations. The default value is False.

Header As ColumnName

Use this parameter to define whether to use the columns from the first row of the table in Google Sheets. If there are no column names in the spreadsheet, then standard Excel column names will be displayed.

Connection Timeout

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

QueryTimeout

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.

Max Cell Length

Allows to specify the maximum text length in a cell.

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.

ODBC Behavior Sets the behavior corresponding to the ODBC specification version expected by a third-party tool. The behavior of the ODBC driver can be changed by calling the SQLSetEnvAttr function to set the SQL_ATTR_ODBC_VERSION environment attribute. Some third-party tools expect the driver to exhibit ODBC 2.x behavior, but forget to call SQLSetEnvAttr with the required version, or pass an incorrect value. In this case, the behavior can be explicitly set in the connection string by setting the ODBC Behavior parameter

.
Default
The default value. The ODBC behavior is 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.
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 are returned as SQL_CHAR, SQL_VARCHAR, and SQL_LONGVARCHAR.
Unicode
All string types are returned as SQL_WCHAR, SQL_WVARCHAR, and SQL_WLONGVARCHAR.
Note: Set the parameter to Ansi or Unicode if your third-party tool supports only ANSI or Unicode strings.

ODBC Driver for Google Sheets Connection String sample

DRIVER={Devart ODBC Driver for ODBC Driver for Google Sheets};Refresh Token=myrefreshtoken;Spreadsheet=ODBC Docs Interlinking;Spreadsheet Id=1i69KtatwBKXFnIUNMmxv8uSpPSfqz2jhimJFhXcIZwI

© 2015-2024 Devart. All Rights Reserved. Request Support ODBC Forum Provide Feedback