SQLConnectionId - cConnection

Returns an SQL connection handle

Type: Function

Return Data Type: Handle

Parameters: String sId

ParameterDescription
sIdThe connection ID


Return Value

SQL connection handle


Syntax
Function SQLConnectionId String sId Returns Handle

Call: Get SQLConnectionId sId to HandleVariable


Description

Once a connection is created and logged into, you may obtain an SQL connection handle by calling SQLConnectionId, passing the connection ID. This lets you create SQL statements without having to worry about connection server-strings and logins.

Sample

Get SQLConnectionId of ghoConnection "ID1" to hoConnect
Get SQLOpen of hoConnect to hoStmt        
Send SQLExecDirect of hoStmt "select * from salesp"
Get SQLFetchResultsetValues of hoStmt to Mydata
Send SQLClose of hoStmt
Send SQLDisconnect of hoConnect

Note that the connection must be registered and logged into before it can be used.