brDCount method

Returns the number of occurrences of a specified character in a clsD3DynamicArray plus one, or zero (0) if the string is null.

Syntax

vValue = object.brDCount( sDelmtr)

Parameters

Parameter Description
lValue The return value is a Long data type indicating the number of occurrences of sDelmtr found in object.
object An object variable that represents a clsD3DynamicArray object.
sDelmtr A String containing a single character or system delimiter.

Remarks

This method is identical to brCount, except that one is added to the returned value, unless the contents of the clsD3DynamicArray object is null.

Example

The following program displays the output of the list command to show a random sampling of data from the customers file.

Sub Main()
   Dim oEnv As New clsD3Environment
   Dim oConn As clsD3Connection
   Dim oTCLCmd As clsD3TclCommand
   Dim iLines As Integer
   Dim I As Integer
 
   Set oConn = oEnv.brOpenConnection("ODBC", "Production") 
   Set oTCLCmd = oConn.brOpenTclCommand ("LIST Customers SAMPLING 5")
   oTCLCmd.brExecute
   iLines = oTCLCmd.brCapturing.brDCount(D3AMChr)
 
   For I = 1 To iLines
   Debug.Print oTCLCmd.brCapturing.brExtractStr(I)
   Next I
 
   oConn.brCloseTclCommand oTCLCmd
   oEnv.brCloseConnection oConn
   Set oEnv = Nothing
End Sub

FlashBASIC reference

dcount