Sub Main() Dim oEnv As New clsD3Environment Dim oConn As clsD3Connection Dim oTCLCmd As clsD3TclCommand Dim sResult As String Dim sNumOrders As String
Set oConn = oEnv.brOpenConnection("ODBC", "Production") Set oTCLCmd = oConn.brOpenTclCommand("")
oTCLCmd.brCommand = "run dm,bp, process.orders" ' Provide appropriate data that is typically ' entered by the user. oTCLCmd.brData "Y" & D3AMChr & "Y" oTCLCmd.brResults = D3ExecuteCapturing oTCLCmd.brExecute Debug.Print oTCLCmd.brCapturing.brCString
sResult = oTCLCmd.brCapturing.brExtractStr(1) sNumOrders = oTCLCmd.brCapturing.brExtractStr(2)
oConn.brCloseTclCommand oTCLCmd oEnv.brCloseConnection oConn Set oEnv = Nothing End Sub |