DeleteConnectionID - cCLIHandler
(Obsolete) Deletes a DataFlex connection ID
Type: Function
Return Data Type: Integer
Parameters
| Parameter | Type | Description |
|---|---|---|
| sID | String | The ID of the connection to delete, can be "" if the index is used. |
| iIndex | Integer | (Zero-based) The index of the connection id, can be -1 if the ID is used. |
Syntax
Function DeleteConnectionID String sID Integer iIndex Returns Integer
Call Example
Get DeleteConnectionID sID iIndex 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.
Individual connection ID settings cannot be edited. It is, however, possible to delete any existing connection ID using the DeleteConnectionID function.
To delete the connection identified by the string "MyID", one could use the following code:
Procedure DeleteMyID
Integer iResult
Handle hoCLI
Get Create U_cCLIHandler to hoCLI
If (hoCLI <> 0) Begin
Set psDriverID Of hoCLI To "MSSQLDRV"
Get DeleteConnectionID of hoCLI "MYID" -1 to iResult
If (iResult) ;
Showln "Something went wrong..."
Else ;
Showln "Connection deleted"
Send Destroy of hoCLI
End
End_Procedure // DeleteMyID
See DataFlex Connection IDs for more information.
Return Value
DeleteConnectionID returns -1 if the connection ID could not be deleted. If the Connection ID was successfully deleted, the index of the deleted connection id is returned.