Odbc.Query

This function retrieves the outcome of executing a query using the ODBC connection specified by the connectionString parameter. The connectionString can be either a text string or a set of property-va...

Syntax

Odbc.Query(connectionString as any, query as text, optional options as nullable record) as table

About

This function retrieves the outcome of executing a query using the ODBC connection specified by the connectionString parameter. The connectionString can be either a text string or a set of property-value pairs. The property values can be text or numeric. An optional parameter called options can be included to define additional properties. The options parameter is a set that may include the following fields: - ConnectionTimeout: This specifies the duration to wait before giving up on establishing a connection to the server. The default time is set to 15 seconds. - CommandTimeout: This sets the duration for which the server-side query can run before being terminated. The default duration is ten minutes. - SqlCompatibleWindowsAuth: This field takes a boolean value (true or false) and determines whether SQL Server-compatible connection string options for Windows authentication should be generated. The default value is set to true.

Explanation

Provide the outcome of executing a basic query using the given connection string. Syntax: Power Query MOdbc.Query("dsn=your_dsn", "select * from Customers") Result: Power Query Mtable