Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 8 of 8 total
Thread Problems with locate in 3.30
Wed, Feb 22 2006 12:15 PMPermanent Link

"Stefano Monterisi"
Hi Tim,
I have a big problem with locate in DBISAM 3.30;
For ex., I have some records with those field's values:

TIM
TIM AND HIS SONS
TIM AND HIS SONS AND HIS WIFE;
Now,
with locate, If I find 'TIM', the first record is showed;
if try to find 'TIM ' (tim +  backspace) for find the second record, the
first is located e returned, and the right space is deleted ;
I use this system for simulate an incremental search, but in this case it
don't works because it trim the space between 'TIM' and 'AND';
I have already deleted the line "RightTrimString(@TempFiledBuffer,#32)" in
TdataCursor.InternlaPutField, but without success;
Attention, I use [loPartialKey,loCaseInsensitive] as locate parameters; If I
delete loCaseInsensitive parameter, all work ok! But I need
loCaseInsensitive option.
Thanks in advance,

Stefano Monterisi



Wed, Feb 22 2006 1:12 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Stefano


I would say that the problem is with the loPartialKey rather than anything else. What happens if you locate for 'TIM A'?

Roy Lambert
Wed, Feb 22 2006 6:34 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Stefano,

<< I use this system for simulate an incremental search, but in this case it
don't works because it trim the space between 'TIM' and 'AND';
I have already deleted the line "RightTrimString(@TempFiledBuffer,#32)" in
TdataCursor.InternlaPutField, but without success; >>

That's where the modification takes place since Locate uses internal TFields
to populate the record buffer used for the search.  Are you sure that
recompiled everything okay ?

<< Attention, I use [loPartialKey,loCaseInsensitive] as locate parameters;
If I delete loCaseInsensitive parameter, all work ok! But I need
loCaseInsensitive option. >>

Did you make any other modifications to the DBISAM code ?  There shouldn't
be any difference between using loCaseInsensitive and not using it - the
internal field assignment still uses the InternalPutField method and handles
the spaces in the same manner.

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Feb 23 2006 4:36 AMPermanent Link

"Stefano Monterisi"
Roy,


>
> I would say that the problem is with the loPartialKey rather than anything
> else. What happens if you locate for 'TIM A'?
>

I cannot locate 'TIM A' because I must write T-I-M-<space>
when I press T 'IM' is selected, when I press the backspace only 'TIM' is
showed: the first record with the value that I have written, but trimmed. I
cannot write the 'A'; ok?

Thanks,
Stefano


Thu, Feb 23 2006 5:00 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Stefano


I can understand that 'TIM ' will find 'TIM' but what actually stops you typing the A?

BTW I can tell English is not your first language Smileyso please take this as a helping hint rather than criticism. You write backspace and I'm guessing you mean space. Backspace to English PC users means delete the character behind the cursor (usually the last character typed). It gives a totally different meaning to "when I press the backspace only 'TIM' is showed" - this is exactly what I would expect if I typed 'TIM ' and then pressed backspace.

If I'm guessing wrong sorry.

Roy Lambert
Thu, Feb 23 2006 5:53 AMPermanent Link

"Stefano Monterisi"
Hi Roy,
you are right, sorry; I have confused English terms;

Spacebar is the correct word Smile

If I type 'TIM' and after the spacebar.....DBISAM locate find  always 'TIM'
(trimmed) and don't give me the correct value 'TIM AND SONS'.
If I delete locaseinsensitive option, the problem vanish.
Thanks, Roy......and excuse me.

Stefano


"Roy Lambert" <roy.lambert@skynet.co.uk> ha scritto nel messaggio
news:008B74A9-BEA1-4BBF-ABAE-3C4AA189C033@news.elevatesoft.com...
> Stefano
>
>
> I can understand that 'TIM ' will find 'TIM' but what actually stops you
> typing the A?
>
> BTW I can tell English is not your first language Smileyso please take this
> as a helping hint rather than criticism. You write backspace and I'm
> guessing you mean space. Backspace to English PC users means delete the
> character behind the cursor (usually the last character typed). It gives a
> totally different meaning to "when I press the backspace only 'TIM' is
> showed" - this is exactly what I would expect if I typed 'TIM ' and then
> pressed backspace.
>
> If I'm guessing wrong sorry.
>
> Roy Lambert
>

Thu, Feb 23 2006 6:39 AMPermanent Link

"Stefano Monterisi"
Hi Tim.
Solved.
It's necessary to delete "RightTrimString(@TempFiledBuffer,#32) " line for
work correctly, but there is another locate  in the logic of application
that must be changed.
Thanks a lot.

Stefano Monterisi



"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> ha scritto nel
messaggio news:1EFC2623-AF2D-4AC7-96F4-8BAE7BFF188A@news.elevatesoft.com...
> Stefano,
>
> << I use this system for simulate an incremental search, but in this case
> it don't works because it trim the space between 'TIM' and 'AND';
> I have already deleted the line "RightTrimString(@TempFiledBuffer,#32)" in
> TdataCursor.InternlaPutField, but without success; >>
>
> That's where the modification takes place since Locate uses internal
> TFields to populate the record buffer used for the search.  Are you sure
> that recompiled everything okay ?
>
> << Attention, I use [loPartialKey,loCaseInsensitive] as locate parameters;
> If I delete loCaseInsensitive parameter, all work ok! But I need
> loCaseInsensitive option. >>
>
> Did you make any other modifications to the DBISAM code ?  There shouldn't
> be any difference between using loCaseInsensitive and not using it - the
> internal field assignment still uses the InternalPutField method and
> handles the spaces in the same manner.
>
> --
> Tim Young
> Elevate Software
> www.elevatesoft.com
>
>

Thu, Feb 23 2006 6:40 AMPermanent Link

"Stefano Monterisi"
Hi Roy,
problem solved.....
thanks for help..and sorry for my English!

Stefano Monterisi


Image