Executes a specified TCL command (clsD3Connection) or executes a TCL command that is either specified or previously set in the brCommand property (clsD3TCLCommand).
oConn.brExecute vsCommand, [ vnResults] oTCLCmd.brExecute[ vsCommand], [ vnResults]
Parameter | Description |
---|---|
oconn | An object variable that represents a clsD3Connection object. |
vsCommand | A Variant (String subtype) specifying the TCL Command to be executed. |
vnResults | Optional. A Variant constant indicating whether results should be captured and/or returned, as specified in Settings. The default is D3ExecuteNoResults. |
oTCLCmd | An object variable that represents a clsD3TCLCommand object. |
Use the following constants in the vnResults argument.
TCL Command Constants | Value | Description |
---|---|---|
D3ExecuteNoResults | 0 | Neither brCapturing nor brReturning are set. |
D3ExecuteCapturing | 1 | Only brCapturing is set. |
D3ExecuteReturning | 2 | Only brReturning is set. |
D3ExecuteWithBoth | 3 | Both brCapturing and brReturning are set. |
Sub Main() Dim oEnv As New clsD3Environment Dim oConn As clsD3Connection Dim oTCLCmd As clsD3TclCommand Set oConn = oEnv.brOpenConnection("ODBC", "Production") Set oTCLCmd = oConn.brOpenTclCommand("copy customers") oTCLCmd.brData "(cust.bak" oTCLCmd.brExecute oConn.brCloseTclCommand oTCLCmd oEnv.brCloseConnection oConn Set oEnv = Nothing End Sub
execute