Article View: borland.public.cppbuilder.database.multi-tier
Article #295Locate and loPartial
From: Bob Kelly
Date: Mon, 04 Nov 2002 14:39
Date: Mon, 04 Nov 2002 14:39
23 lines
1664 bytes
1664 bytes
Hi all,
I'm trying to use the locate method to allow partial input of a first and
last name and locate the nearest match.
I find that I cannot get the first name to allow partial match whereas the
last name does.
ie input Jo Blog in a TEdit field, (split into first an last) and it finds
nothing whereas input of Joe Blog finds the Joe Bloggs record.
relvant code is:-
TLocateOptions Opts;
Opts.Clear();
Opts << loPartialKey << loCaseInsensitive;
Variant locvalues[2];
locvalues[0] = Variant(first);
locvalues[1] = Variant(last);
ClientDataSet1->Locate("FirstName;LastName", VarArrayOf(locvalues, 1),
Opts);
Am I doing something wrong here?
--
Bob Kelly
Dundee College
Technical Details
Message-ID:
<3dc686b2$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-04!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fcd2b,15d7dcfb2a77090b,start X-Google-Attributes: gidfcd2b,public X-Google-ArrivalTime: 2002-11-04 07:44:05 PST Reply-To: "Bob Kelly" <bob@zunzeecoll.ac.uk> From: "Bob Kelly" <bob@zunzeecoll.ac.uk> Newsgroups: borland.public.cppbuilder.database.multi-tier Subject: Locate and loPartial Date: Mon, 4 Nov 2002 14:39:26 -0000 Lines: 25 Organization: Dundee College X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 194.82.177.33 Message-ID: <3dc686b2$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1036420786 194.82.177.33 (4 Nov 2002 06:39:46 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-04!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!newsgroups.borland.com!not-for-mail