Re: [Lazarus] lazarus Digest, Vol 184, Issue 9

2023-05-27 Thread john Ward via lazarus
To, Wkitty and Michael,
the only thing I didn't see on the code list is the string definition
of field 'tempid' which is defined as string and is input on edit1
field.

There is an example of this code in Delphi tutorial and the specifications in 
the TDbf Manual written by Micha Nelissen and referenced in the Lazarus data 
base online references as well as 
the Lazarus Handbook. The field 'tempid' has nothing to do with a
temporary field, I have a System for Temporary Personnel Services and 
the code is part of a re-write of my package from Kylix to Lazarus.

I selected dBase because the performance was exceptional and the Kylix 
package used the Topaz Database, which is dBase with a number of 
useful extension.
My re-write is kind of stopped now, you can't use the next arrow in
the tDbnavigator bar to go x number of records in files that have 
thousands of entries.

Thank you very much for your looking at the program and if there is any more I 
can do, please let me know.
John(j...@mbstemps.com)


> On 05/27/2023 6:00 AM EDT lazarus-requ...@lists.lazarus-ide.org wrote:
> 
>  
> Send lazarus mailing list submissions to
>   lazarus@lists.lazarus-ide.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>   https://lists.lazarus-ide.org/listinfo/lazarus
> or, via email, send a message with subject or body 'help' to
>   lazarus-requ...@lists.lazarus-ide.org
> 
> You can reach the person managing the list at
>   lazarus-ow...@lists.lazarus-ide.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of lazarus digest..."
> 
> 
> Today's Topics:
> 
>1. Re: locate command for dBase (wkitt...@windstream.net)
>2. Re: locate command for dBase (Michael Van Canneyt)
>3. Re: locate command for dBase (wkitt...@windstream.net)
> 
> 
> --
> 
> Message: 1
> Date: Fri, 26 May 2023 07:26:28 -0400
> From: wkitt...@windstream.net
> To: lazarus@lists.lazarus-ide.org
> Subject: Re: [Lazarus] locate command for dBase
> Message-ID: 
> Content-Type: text/plain; charset=utf-8; format=flowed
> 
> On 5/25/23 8:12 PM, john Ward via lazarus wrote:
> >  ? if
> >  ? temp.Locate('temp_no', (tempid),[loPartialkey])
> >  ? then
> >  ? begin
> > 
> >  ? ? showmessage('we found the field or Partial' + tempid);
> >  ? ? showmessage('current temp_no is ');
> >  ? ? tno := temp.FieldbyName('temp_no').asString;
> >  ?? showmessage('tempno is = ' + tno);
> >  ? ? end;
> > The above code, executes the 'then', shows me what was searched for BUT 
> > when a
> > data field is displayed, the original record is pointed to, NOT a record 
> > further 
> > in the database.
> 
> 
> i don't see where you did a seek to the record you are trying to get to... 
> granted, it has been a long while since i did anything with FPC/Lazarus or an 
> dBase databases but it would seem there should be an obvious seek action... 
> maybe...
> 
> 
> -- 
>   NOTE: No off-list assistance is given without prior approval.
> *Please keep mailing list traffic on the list where it belongs!*
> 
> 
> --
> 
> Message: 2
> Date: Fri, 26 May 2023 13:31:27 +0200 (CEST)
> From: Michael Van Canneyt 
> To: wkitty42--- via lazarus 
> Subject: Re: [Lazarus] locate command for dBase
> Message-ID: 
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
> 
> 
> 
> On Fri, 26 May 2023, wkitty42--- via lazarus wrote:
> 
> > On 5/25/23 8:12 PM, john Ward via lazarus wrote:
> >>  ? if
> >>  ? temp.Locate('temp_no', (tempid),[loPartialkey])
> >>  ? then
> >>  ? begin
> >>
> >>  ? ? showmessage('we found the field or Partial' + tempid);
> >>  ? ? showmessage('current temp_no is ');
> >>  ? ? tno := temp.FieldbyName('temp_no').asString;
> >>  ?? showmessage('tempno is = ' + tno);
> >>  ? ? end;
> >> The above code, executes the 'then', shows me what was searched for BUT 
> > when a
> >> data field is displayed, the original record is pointed to, NOT a record 
> > further 
> >> in the database.
> >
> >
> > i don't see where you did a seek to the record you are trying to get to... 
> > granted, it has been a long while since i did anything with FPC/Lazarus or 
> > an 
> > dBase databases but it would seem there should be an obvious seek action... 
> > maybe...
> 
> the locate() is a seek action.
> 
> But without more info/code it is difficult to give an answer to the OP's
> question.
> 
> Michael.
> 
> --
> 
> Message: 3
> Date: Fri, 26 May 2023 11:09:12 -0400
> From: wkitt...@windstream.net
> To: lazarus@lists.lazarus-ide.org
> Subject: Re: [Lazarus] locate command for dBase
> Message-ID: <9a06d191-09f2-2844-cac4-ed68b75dc...@windstream.net>
> Content-Type: text/plain; charset=utf-8; format=flowed
> 
> On 5/26/23 7:31 AM, Michael Van Canneyt via lazarus wrote:
> > On Fri, 26 May 2023, wkitty42--- via lazarus wrote:
> >> i don't see where you did a seek to the record you are trying 

Re: [Lazarus] locate command for dBase

2023-05-27 Thread Werner Pamler via lazarus

The attached project demonstrates that dbf.Locate works as expected.

<>
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus