Search string with case or no-case in API and SQL way

info at vallemediatime.com info at vallemediatime.com
Thu Jun 16 08:52:40 CDT 2005


> > Hi Ruslan and list,
> > I've seen that in V2 the case and no-case search are changed.
> > In API way seems to me that searching works in 'no_case' setting;
> > in SQL way the searching works in 'case' setting... right?
>
> In general no. Both should work in the same way
Strange, I get case insensitive result table by API and case sensitve by SQL

> And this way is defined mainly by
>     db.CollationAttribute( kStrength ) = kPrimary/kSecondary/...
> > Can you tell me more informations? Or where to find it?
> > Thanks
In doc VKernel p.68 I read few line about this problem and in SQL doc, about
LIKE, I read only example for ESCAPE expressions...


> > Now I want try thid query with 'no_case' setting but I need some help.
> >
> > on searchByString
> > searchString = member("searchString").text
> > gCursor = 0
> > query = "SELECT RecID, * from STUDENTI\
> > WHERE '" & searchString & "' IN\
> > (sF1, sF2, sF3, sF4, sF5, sF6, sF7, sF8, sF9, sF10,\
> > sF11, sF12, sF13, sF14, sF15, sF16, sF17, sF18, sF19, sF20,\
> > sF21, sF22, sF23, sF24, sF25, sF26, sF27, sF28, sF29, sF30)"
> > gCursor = gDb.sqlSelect(query, #kServer, #kReadWrite, #kRandom)
> > if CheckValError() then exit
> > updateResultGrid()
> > end

> > I must insert 'no_case' like V1 or what?
> V2 do not have keyword no case.
> You can use for REGEX the  (?i) to change case sensitivity.

I understand that for use REGEX in SQL is necessary insert LIKE operator in
sql query, right?

I've tried to insert LIKE in my code but not works and I have not idea if
this is the right way, sorry,
I think that this is a ordinary query and I don't know because it's become
more difficult in V2  :-)

query = "SELECT RecID, * from" && gTableName &&\
"WHERE '" & searchString & "' LIKE '(?i)" && searchString & "' IN" &&
member("fieldNameList").text

Some suggestion?

> Look again on example Field_Find.
It's a example for API way, I need for SQL instead
In API search I've not problem with case insensitive, but it's works much
more slowly of the sql search...
because I need more repeat loops for get the value in result table.

> Note, in V4MD it was fixed in 2.0.4
ok
Thanks Paolo

>
> --
> 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
>
>
>
> --
> Internal Virus Database is out-of-date.
> Checked by AVG Anti-Virus.
> Version: 7.0.323 / Virus Database: 267.6.2 - Release Date: 04/06/2005
>
>



More information about the Valentina mailing list