Fld.FindSingle problem

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Sep 18 12:45:28 CDT 2006


On 9/18/06 12:32 PM, "Joakim Schramm" <joakim at astrocalc.com> wrote:

> Private Sub GetEditText()
> Dim sKey As String
> Dim mResult As VBitSet
> Dim cnt As Long
> Dim mVset As Vset
> 
> 'In this case EditRange is 0 - but same result with 1 & 2
> Select Case EditRange
>     Case 2
>         sKey = StrMakeKey(AspPlan, Plan1, Plan2)
>         lblTextHeader.FontName = AFont
>         lblTextHeader.Caption = PlanetSymbols(AspPlan) & "=" &
> PlanetSymbols(Plan1) & "/" & PlanetSymbols(Plan2)
>     Case 1
>         sKey = StrMakeKey(Plan1, Plan2)
>         lblTextHeader.FontName = AFont
>         lblTextHeader.Caption = PlanetSymbols(Plan1) & "/" &
> PlanetSymbols(Plan2)
>     Case 0
>         sKey = "000"
>         lblTextHeader.FontName = MsFont
>         lblTextHeader.Caption = fm(545)
> End Select

-----------------------
> ' Just make an empty bitSet
> Set mResult = tblText.SelectNoneRecords
> Set mResult = mResult.InitWithArraySet(tblText.PhysicalRecordCount(),

First line with tblText.SelectNoneRecords - have no sense as I see


> arrEditBody)
> Set mVset = mResult
> Debug.Print mVset.Count ' = 1
> 
> Call fldKey.ValueExistsWithCount(sKey, cnt, mResult)
> 'cnt = 3
> If Not mResult Is Nothing Then
>     'here ALWAYS firstrecord matching sKey in tblText is returned
>     mCurrRec = fldKey.FindSingle(sKey, mResult)
> Else
>     mCurrRec = 0
> End If
> 
> If mCurrRec <> 0 Then
>     tblText.RecID = mCurrRec
>     txtEdit.Text = cStringSAR(fldBody.GetString, Chr$(255), vbNewLine, 0)
> Else
>     txtEdit.Text = vbNullString
> End If
> 
> End Sub
> 

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list