RpReport:SetSQLConnection() Method

<< Click to Display Table of Contents >>

Navigation:  RpReport Class >

RpReport:SetSQLConnection() Method

Previous pageReturn to chapter overviewNext page

Purpose

This method allows you to specify SQL connections for RP to use.

Syntax

<oReport>:SetSQLConneciton(oConnection)  logic

Arguments

oConnection        The connection to add to the list of available connections.

Description

This new method is available in the Rp2Sql32 and Rp2Dsn32 libraries.  It allows you to specify a SQL connection for RP to use.  You can specify more than one by repeated calls to this method.  At runtime, RP checks the list of connections it has built to see if one exists with the same data source that is need by the rpSQLQuery class.  If a connection is found, it uses that connection instead of opening a new one.

Example

// Set a connection

oReport:SetSQLConnection(oMyConnection)