TableConnectionID - cConnection
Returns the connection ID of a table if the table uses managed connection
Type: Function
Return Data Type: String
Parameters
| Parameter | Type | Description |
|---|---|---|
| hTableNumber | Handle | [number of the SQL table to get connection information from] |
Syntax
Function TableConnectionID Handle hTableNumber Returns String
Call Example
Get TableConnectionID hTableNumber to StringVariable
Description
This function uses IsManagedConnection to determine if the table uses managed connection and returns a string containing the manage connection information.
If it does not use managed connection, the function returns blank ("").
Sample
Procedure ShowTableConnectionID
String sConnID
Open Customer
// Get the connection ID used by the Customer table
Get TableConnectionID of ghoConnection (RefTable(Customer.File_Number)) to sConnID
Showln "Customer table connection ID: " sConnID
End_Procedure
Sample
Procedure CompareTableConnections
String sCustConn sSalesPConn
Open Customer
Open SalesPerson
Get TableConnectionID of ghoConnection (RefTable(Customer.File_Number)) to sCustConn
Get TableConnectionID of ghoConnection (RefTable(SalesPerson.File_Number)) to sSalesPConn
If (uppercase(sCustConn) = uppercase(sSalesPConn)) Begin
Showln "Customer and SalesPerson share the same connection."
End
Else Begin
Showln "Tables use different connections."
End
End_Procedure
See Also