[VCOM] Search method doesn't return an object of Nothing when it
should
Joakim Schramm
joakim at astrocalc.com
Thu Mar 8 04:43:17 CST 2007
Hi,
This is 2.5.7 VCOM, and it has been put into Mantis as #2238
With some of the fld.Find methods, when a search fails, it doesn't return an
empty (Nothing) object, although the set contains no records. This same
error has been before and has now comeback (it was in 2.5.6 also).
Example below:
Set ItrSearch = Nothing
Set mLink = mAtlasDB.Link(lnkCountryHasPlaces)
If Not CBool(SearchScope) Then
Set col = mLink.FindLinkedAsBitSet(CountryID, tCountry, tPlaces)
End If
Select Case SearchCriteria
Case 0&
Set Res = fPlace.FindValue(PlaceName, col)
Case 1
Set Res = fPlace.FindStartsWith(PlaceName, col)
Case 2
Set Res = fPlace.FindEndsWith(PlaceName, col)
Case Else
Set Res = fPlace.FindContains(PlaceName, col)
End Select
In the search code above non of the fPlace.Find methods returns a record
because the place doesn't exists. However, fPlace.FindValue(PlaceName, col)
result in
Res = Nothing, while all the others return an object that that is NOT
Nothing, but still they contain no record.
Regards,
Joakim
More information about the Valentina
mailing list