Re: problem with ChooseContact() filtering

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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 ?








.



Relevant Pages

  • Re: subclassing CEdit to customized the display
    ... Mucking about with the CEdit painting is a task that will surely bring ... I would try handling WM_SETTEXT, examining the input string, shortening it ... Display the full path to a file on a resizable dialog ... I used an edit control and set it to ...
    (microsoft.public.win32.programmer.gdi)
  • Re: How to validate CEdit only number input?
    ... notepad then I copy and paste it on the CEdit, ... How to prevent the CEdit from accepting non-numeric values which is copied ... an edit control that accepts fewer characters and dynamically rejects ... try entering a string of ...
    (microsoft.public.vc.mfc)
  • Re: text from a editable to a file
    ... I'm making a GUI and i'm using a editable in which it is possible to write more than one line. ... also show the command you use to read edit_string from the edit control. ... fprintf(fid, '%s', coments); ... that will at least put the letters in the right order in each string. ...
    (comp.soft-sys.matlab)
  • KeyPressFcn revisited, bug or feature ?
    ... I am designing a GUI where I want a pushbutton uicontrol enabled only ... the 'String' returned is what was in the edit control ...
    (comp.soft-sys.matlab)
  • Re: How to write a song
    ... I tried amusing myself by playing one note per ... string, 6th to 1st and back again, using the digits of my mobile number ...
    (uk.music.guitar)