Skip to content

RedirectIdConnectString - cCLIHandler

(Obsolete) Redirects a connection of a connection ID

Type: Function
Return Data Type: Integer

Parameters

Parameter Type Description
sConnectionId String Conenction ID
sConnectString String Connection String
bKeepLoggedIn Boolean Keep Logged In?

Syntax

Function RedirectIdConnectString String sConnectionId String sConnectString Boolean bKeepLoggedIn Returns Integer

Call Example

Get RedirectIdConnectString sConnectionId sConnectString bKeepLoggedIn to IntegerVariable

Description

(Obsolete)

As of DataFlex 19.0, Connection Ids are handled via Managed Connections, making this method obsolete. All of these techniques still work, but they have been replaced with better techniques that are also managed via the Studio and other DataFlex tools. See the cConnection class and Managed Connections for more.

Redirects a connection of a connection ID.

RedirectIDConnectString will redirect from the old connection (Server/Database the connectionId currently points to) to the new connection (Server/Database specified in sConnectString). All opened tables will be moved from old connection to new connection. (Tables must have identical structure in both connections).

If bKeepLoggedIn = False, the new connection will be logged in, the old connection will be logged out. If bKeepLoggedIn = True, connections will remain open and re-used on next redirectIdConnection.

Return Value

0: the redirection was successful. 1: the connection ID does not exist or cannot be found. 2: login into the new connection failed.