Sub Main() Dim oEnv As New clsD3Environment Dim oConn As clsD3Connection Dim oRule As clsD3RuleModule Dim vInput1 As Variant Dim vInput2 As Variant Dim vResult As Variant
Set oConn = oEnv.brOpenConnection("ODBC", "production") Set oRule = oConn.brOpenRuleModule("addit", "bp", "dm")
vInput1 = CVar(5) vInput2 = CVar(7) oRule.brCall vResult, vInput1, vInput2 MsgBox "The result is " & CInt(vResult)
vInput1 = CVar(2) vInput2 = CVar(3) oRule.brCall vResult, vInput1, vInput2 MsgBox "The result is " & CInt(vResult)
oConn.brCloseRuleModule oRule oEnv.brCloseConnection oConn Set oEnv = Nothing End Sub |