Fld.FindSingle problem

Ivan Smahin ivan_smahin at valentina-db.com
Mon Sep 18 12:46:48 CDT 2006


Hello Joakim,

Monday, September 18, 2006, 12:32:34 PM, you wrote:

>> 
>> This is wrong idea. Actually we will improve the situation 
>> with IVSet, IVArraySet and IVSet, but currently it should be 
>> something like this:
>> 
>> ...
>> Dim arrEditBody As VArraySet
>> Dim mResult As VBitSet
>> 
>> Set arrEditBody = lnk.FindLinked(mConfNum, tblConf, tblText)
>>   
>> ' Just make an empty bitSet
>> Set mResult = tbl.SelectNoneRecords
>> Set mResult = 
>> mResult.InitWithArraySet(tbl.PhysicalRecordCount(), arrEditBody)
>> 
>> Call fldKey.ValueExistsWithCount(sKey, cnt, mResult) ...
>> 
> Hi,

> Doesn't work! I may need to clearify one thing, it's not that it doesn't
> select/return a record, it's that it returns the wrong record. Also with
> your code above I get the same result. The table has 3 records with value of
> sKey, arrEditBody only has 1, the third of those 3, the result returned is
> the first record of table NOT of record set.

I see, but I get correct results with this.

> I will paste full code below for concerned parts. You will see test code
> with VSET.Count return 1, while ValueExistsWithCount return 3

It's hard to get the problem just looking at code.
Could you please send me directly some little project?

-- 
Best regards,
 Ivan                            mailto:ivan_smahin ÎÁ valentina-db.com



More information about the Valentina mailing list