brCompile method

Flash compiles the specified FlashBASIC program or subroutine.

Syntax

bValue = object.brCompile(sRuleBase, sRuleFile, sRuleName)

Parameters

Parameter Description
bvalue The return value is a Boolean data type that is True if successful.
object An object variable that represents a clsD3Connection object.
sRuleBase A String containing the name of account where the subroutine exists.
sRuleFile A String containing the name of the file where the subroutine exists.
sRuleName A String containing the name of the program or subroutine.

Example

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")
   oConn.brCompile"dm", "bp", "addit"
   oConn.brCatalog "dm", "bp", "addit"
 
   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

TCL reference

compile