Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

...

DataTable $Database.ExecuteQuery(connectionName: string, query: string, parameters: object, timeout: number, parameters: object)

Arguments

string connectionName
name of external database name
string query
query to be run
object parameters
parameters set on the query. Optional.
number timeout
request timeout. Optional.

object parameters

Parameters set on the query. Optional.

Remarks

...

Remarks

This method is used to run a query and fetch results from an external database. The connection name is defined on the domain settings with a connection string to database.

Query dialect is based on external database type and directly executed on the database.

Timeout parameter is used to specify the maximum time to wait for the query to execute, if not specified default timeout is used.

Example

Code Block
languagejs
$Database.ExecuteQuery("CONNECTION_NAMEAppDB", "select * from wDomainsUsers where Id = @Id", {
    Id: "17cec122-a909-45ac-89f9-78b5e96fc0c41"
});

See Also