Re: problem with ChooseContact() filtering
- From: "SPECIALIST" <jan.ger@xxxxx>
- Date: Thu, 4 Dec 2008 18:45:57 +0100
ok. works.
I can only add,
that when I want to restrict from some string got from edit control
I uses (see the additional "z" on the end of second rule):
wsprintf(sztxx,_T("[FirstName]>=\"%s\" AND [FirstName]<\"%sz\""),szt,szt);
where: "szt" is the string from edit control
but if we want to search in firtname middlename lastname company...in one
time, it becomes veeeeery long string....
"Peter Foot [MVP]" <feedback@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:E9AB22AF-E141-4897-8EBA-B4652B080CFA@xxxxxxxxxxxxxxxx
I've used something similar (managed code but calls the same function):-
Microsoft.WindowsMobile.Forms.ChooseContactDialog ccd = new
Microsoft.WindowsMobile.Forms.ChooseContactDialog();
ccd.RestrictContacts = "[LastName] > \"Br\" AND [LastName] <
\"Bs\"";
ccd.ShowDialog();
This displays all contacts with last names beginning with Br e.g. Brown.
There is bound to be a delay when you add in a restriction as without it
the control can just cycle through every row in the database, once you
introduce a query there is an additional level of processing required.
Peter
--
Peter Foot
Microsoft Device Application Development MVP
peterfoot.net | appamundi.com | inthehand.com
APPA Mundi Ltd - software solutions for a mobile world
In The Hand Ltd - .NET Components for Mobility
"SPECIALIST" <jan.ger@xxxxx> wrote in message
news:%23NcNx$hVJHA.1184@xxxxxxxxxxxxxxxxxxxxxxx
sorry, this is not working...
also, I observe, that when I call this function without
chooserData.lpstrRestrictContacts
the Select Contact dialog displays very fast,
but when I try to use the above restriction, this dialog displays after
noticable delay.
it is with only 200 contacts in database.
"Peter Foot [MVP]" <feedback@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:39CD3637-5E82-4493-B032-BBB80806FD5E@xxxxxxxxxxxxxxxx
It is the correct behaviour as you are doing an exact string match. POOM
doesn't support the Like operator to do matching with a wildcard. I
think you should however be able to use something like:-
[FirstName] >= "ann" AND [FirstName] < "ano"
Peter
--
Peter Foot
Microsoft Device Application Development MVP
peterfoot.net | appamundi.com | inthehand.com
APPA Mundi Ltd - software solutions for a mobile world
In The Hand Ltd - .NET Components for Mobility
"SPECIALIST" <jan.ger@xxxxx> wrote in message
news:O$mGGSgVJHA.4384@xxxxxxxxxxxxxxxxxxxxxxx
I observe problem with:
HRESULT hr = ChooseContact(&chooserData)
when I set :
chooserData.lpstrRestrictContacts = (LPCWSTR)sztxx;
if I use wsprintf(sztxx,_T("[FirstName]=\"%s\""),szt);
the Contacts dialog displays (mean: returns) only correct results when
I type a full string of name,
when I type the only some part of name, this returns nothing
for example:
[FirstName]="anna" returns correctly all Contacts with the first name
anna
but:
[FirstName]="ann" returns nothing
I tried also [FirstName]="ann*" it changed nothing
is it a bug in WM implementation of pimstore.lib ?
.
- References:
- problem with ChooseContact() filtering
- From: SPECIALIST
- Re: problem with ChooseContact() filtering
- From: Peter Foot [MVP]
- Re: problem with ChooseContact() filtering
- From: SPECIALIST
- Re: problem with ChooseContact() filtering
- From: Peter Foot [MVP]
- problem with ChooseContact() filtering
- Prev by Date: Re: problem with ChooseContact() filtering
- Next by Date: Re: Character encoding
- Previous by thread: Re: problem with ChooseContact() filtering
- Next by thread: command-line stuff under Windows Mobile 6?
- Index(es):
Relevant Pages
|