SQLFileConnect - cSQLHandleManager
Returns a handle to the same connection of the table opened
Type: Function
Return Data Type: Handle
Parameters
| Parameter | Type | Description |
|---|---|---|
| iFileNum | Integer | Table number to connect to |
Syntax
Function SQLFileConnect Integer iFileNum Returns Handle
Call Example
Get SQLFileConnect iFileNum to HandleVariable
Description
The SQLFileConnect function will return a handle to the same connection object (cSQLConnection) of the table opened under the number passed in iFileNum. The table must be accessed through one of the Connectivity Kits that support Embedded SQL.
Sample
If, for example, we are using the order entry sample data converted to one of the Connectivity Kits that supports Embedded SQL, we can use the following code to get a connection handle:
Handle hoSQLMngr
Handle hoDbc
Object oSQLManager is a cSQLHandleManager
Move Self to hoSQLMngr
End_Object
Open Customer
Get SQLFileConnect of hoSQLMngr Customer.File_Number to hoDdbc
Return Value
Handle of a cSQLConnection object. Returns zero (0) if the open fails.