Creates a new instance of the clsD3TCLCommand class, providing the ability to execute and capture results of a TCL command.
Set oTCLCmd = object.brOpenTCLCommand( sCmd)
Parameter | Description |
---|---|
oTCLCmd | An object variable that represents a clsD3TCLCommand object to be created. |
object | An object variable that represents a clsD3Environment object. |
sCmd | A String that specifies the TCL Command to be executed. |
This method does not execute the TCL command. The brExecute method executes the TCL statement on the server. If the TCL command requires input, such as a copy statement, the brData method must precede the brExecute method.
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