SQL_GetConnection()

Examples


The SQL_GetConnection() function of the XSQLExec form retrieves a pass-through SQL connection maintained by Microsoft Dynamics GP.

Syntax

SQL_GetConnection(type, connection)

Parameters

type – Specifies how the pass-through SQL connection will be used. The value corresponds to one of the following constants:

[spacer]

Constant

Description

FOREGROUND

Pass-through SQL will be executed from a foreground script.

BACKGROUND

Pass-through SQL will be executed from a background script.


connection – A returned long integer containing the pass-through SQL connection.

Return value

An integer indicating whether the connection was returned. The value 0 indicates the connection was returned. Any othe value indicates an error occurred.


Documentation Feedback