Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Findkey doesn't work if string starts with "$"
Fri, Jul 27 2007 12:44 AMPermanent Link

Dave Harrison
I'm trying to do a simple:

KeyVal := '$-1234151';
if Table1.FindKey([KeyVal]) then
  ShowMessage('Found')
else
  ShowMessage('Not Found');

The index is String(17) and it doesn't find it. Alphanumeric ley values
like "ABCD" are found, but not a string that starts with "$". The
"$-1234151" is in the table because I can see it with DBSys.

Why can't it find a string starting with "$"?

Dave
DBISAM 4.25
Fri, Jul 27 2007 4:21 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Dave,

<< I'm trying to do a simple:

KeyVal := '$-1234151';
if Table1.FindKey([KeyVal]) then
  ShowMessage('Found')
else
  ShowMessage('Not Found');

The index is String(17) and it doesn't find it. Alphanumeric ley values
like "ABCD" are found, but not a string that starts with "$". The
"$-1234151" is in the table because I can see it with DBSys. >>

I can't replicate this here.  Is the index only on that one column, and is
it case-sensitive or case-insensitive ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Jul 27 2007 5:33 PMPermanent Link

Dave Harrison
Tim Young [Elevate Software] wrote:
> Dave,
>
> << I'm trying to do a simple:
>
>  KeyVal := '$-1234151';
>  if Table1.FindKey([KeyVal]) then
>    ShowMessage('Found')
>  else
>    ShowMessage('Not Found');
>
>  The index is String(17) and it doesn't find it. Alphanumeric ley values
> like "ABCD" are found, but not a string that starts with "$". The
> "$-1234151" is in the table because I can see it with DBSys. >>
>
> I can't replicate this here.  Is the index only on that one column, and is
> it case-sensitive or case-insensitive ?

It was operator error. Sheesh. I had a filter on the table to exclude
rows with this field starting with "$*" (1st pass) and forgot to turn
off the filter on the second pass when I was processing these "$" rows,
so the FindKey would never find it. Oh well.

Just call me
red-faced Dave
Mon, Jul 30 2007 8:07 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Dave,

<< It was operator error. Sheesh. I had a filter on the table to exclude
rows with this field starting with "$*" (1st pass) and forgot to turn off
the filter on the second pass when I was processing these "$" rows, so the
FindKey would never find it. Oh well. >>

I'm glad you found the problem.

Thanks,

--
Tim Young
Elevate Software
www.elevatesoft.com

Image