Sub Main() Dim oEnv As New clsD3Environment Dim oConn As clsD3Connection Dim oArray As New clsD3DynamicArray Dim sContinent As String Dim lFound As Long
Set oConn = oEnv.brOpenConnection("ODBC", "production") oArray.brCString = "Europe" & D3VMChr & "South America" & D3VMChr & "Africa" Set oArray = oConn.brSort(oArray)
sContinent = InputBox("Enter a continent") If oArray.brLocateStrSeq(sContinent, "al", lFound, 1) = True Then MsgBox sContinent & " is already there." Else oArray.brInsertStr sContinent, 1, lFound End If
MsgBox oArray.brCString
oEnv.brCloseConnection oConn Set oArray = Nothing Set oEnv = Nothing End Sub |