BitSet operations
Joakim Schramm
joakim at astrocalc.com
Wed May 10 00:44:33 CDT 2006
Correction.
> -----Original Message-----
> From: valentina-bounces at lists.macserve.net
> [mailto:valentina-bounces at lists.macserve.net] On Behalf Of
> Joakim Schramm
> Sent: 10 May 2006 00:34
> To: 'Valentina Developers'
> Subject: RE: Re[2]: BitSet operations
>
>
>
> > -----Original Message-----
> > From: valentina-bounces at lists.macserve.net
> > [mailto:valentina-bounces at lists.macserve.net] On Behalf Of Ruslan
> > Zasukhin
> > Sent: 09 May 2006 23:40
> > To: valentina at lists.macserve.net
> > Subject: Re: Re[2]: BitSet operations
> >
> > On 5/10/06 12:08 AM, "Joakim Schramm" <joakim at astrocalc.com> wrote:
> >
> > >> FindVlaue -- find EXACT match
> > >>
> > > Well it doesn't find an exact match either when more then 1
> > capital in
> > > a word, and otherwise it do find "exact" without caring
> > about case. So
> > > if search is "abds" it also finds "Abds" but not "ABds", if
> > search is
> > > "ABds" it finds "abds", "Abds" but not "ABds"?
> >
> > But you talk about CASE INSENSETIVE SEARCH !!!
> >
> > You need set correct CollationAttrubute for you database.
> >
> > db.CollationAttribute( kStrength ) = kPrimary
> >
> > Check docs please.
> >
> Unfortunately I must say this doesn't matter, changing to
> db.CollationAttribute( kStrength ) = kPrimary makes no
> difference, the results are the same. Sorry, but it is still
> true - If a string field (first in record in this case) have
> a word (string) with 2 or more CAPITAL letters, the record is
> totally ignored by FindValue and FindValueAsArraySet AND this
> is also true when a numeric field is searched (Byte in this
> case), the value simply doesn't exists although it really
> does. This is VCOM2
>
A correction, what heppened was I set db.CollationAttribute( kStrength ) =
kPrimary BEFORE db was open but after the db object was initiated, like this
Set DB = New VDatabase
With DB
.InitLocal
.DateFormat = EVDateFormat.kYMD
.CollationAttribute(kStrength) = kPrimary
DbPath = AtlasDir + "Atlas.vdb"
'If Database not exists we create it.
If Not FileExists(DbPath) Then
.Create DbPath
CreateStructure
End If
.Open DbPath
If .IsOpen Then
...
End With
It MUST be set AFTER db is open, like this
Set DB = New VDatabase
With DB
.InitLocal
.DateFormat = EVDateFormat.kYMD
DbPath = AtlasDir + "Atlas.vdb"
'If Database not exists we create it.
If Not FileExists(DbPath) Then
.Create DbPath
CreateStructure
End If
.Open DbPath
If .IsOpen Then
.CollationAttribute(kStrength) = kPrimary
...
End With
Then it works. This need to be added to documentation.
Joakim
> Joakim
> >
> > > Also, when search in numeric field of records it finds nothing in
> > > records with a string field having more then 1 capital
> > letter in a word.
> > >
> > >> FindStartWith() - find strings that START WITH ...
> > >>
> > >> Please check this point.
> > >>
> > > I have not used the string functions her as I was
> interested in an
> > > exact (case less) match and there is no specific string function
> > > returning an exact match so I "assume" FindValue and
> > > FindValueAsArraySet also should work with straings in this case?
> > >
> > >> Also note that you can control if db/table/fied should do
> > >> case-sensitive or case-insensetive searches and
> sorting. Use for
> > >> this db.CollationaAttribute
> > >>
> > > I haven't looked at this one though, guess it is as default, but
> > > should it have any impact on numeric searches? The "main"
> > problem is
> > > that numeric searches also doesn't work if a string field
> has 2 or
> > > more capitals in same word. With word I mean string field
> > can be like
> > > "Alice Springs" is 2 words, if this is "Alice Springs" no
> > search what so ever work on that record.
> >
> > Numeric searches DO NOT depend on collation. Only strings.
> >
> > --
> > 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]
> >
> >
> > _______________________________________________
> > Valentina mailing list
> > Valentina at lists.macserve.net
> > http://lists.macserve.net/mailman/listinfo/valentina
> >
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>
More information about the Valentina
mailing list