FindValue does not return nil when no record found

Joakim Schramm joakim at astrocalc.com
Thu May 11 11:55:19 CDT 2006


Hi Kirill, 

This is the problem, I can't reproduce it either when creating an example
project, then it work as I think it should. Yet, in my production code this
problem appear and I can't for my life see what possibly is different with
the coding in my production code, compared to the example code - except
there are much other code involved - but it doesn't involve this part. My
only bet (hope) is that you can see in you Com/kernel code and "condition"
that may result in return of an empty object set?

This is what happen, FindValue return an empty object instead of
nil/nothing.

The only other thing I can think of is that there is something special in
creation of my database file (or it's data) that causes this?

This as well a pain to code around as I can't test for nothing, instead I
have to cast the VBitSet object to a VSet object and test for .Count = 0 or
.IsEmpty = True BUT if it some case, under some circumstanse will return
Nothing then that test will case an exception.

The strange thing is this:

Set bitLngPlaces = fLngDeg.FindValue(Longitude, bitPlaces) ' Return Empty
object if not found

Set bitLngPlaces = fLngDeg.FindValue(Longitude) 'Return Nothing if not found

Joakim
> -----Original Message-----
> From: 
> valentina-bounces+joakim=astrocalc.com at lists.macserve.net 
> [mailto:valentina-bounces+joakim=astrocalc.com at lists.macserve.
> net] On Behalf Of Kirill Pekarov
> Sent: 11 May 2006 10:07
> To: Valentina Developers
> Subject: Re[2]: FindValue does not return nil when no record found
> 
> Hi, Joakim.
> 
> You wrote 11 мая 2006 г., 2:14:11:
> 
> > I pass a value that with guaranty not exists in table, 
> neither in field.
> > Hence, bitLngPlaces is expected to Nothing (Nil), but it is not.
> 
> I can't reproduce.  Could you send a project to me for reproducing?
> 
> 
> --
> With best regards
>  Kirill                          
> mailto:kirill_pekarov at valentina-db.com
> 
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
> 



More information about the Valentina mailing list