The SQL_GetConnection() function of the XSQLExec form retrieves a pass-through SQL connection maintained by Microsoft Dynamics GP.
SQL_GetConnection(type, connection)
• type – Specifies how the pass-through SQL connection will be used. The value corresponds to one of the following constants:
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.
An integer indicating whether the connection was returned. The value 0 indicates the connection was returned. Any othe value indicates an error occurred.