[Lazarus] lazarus Digest, Vol 184, Issue 9
john Ward
john at mbstemps.com
Sun May 28 00:16:28 CEST 2023
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 (john at mbstemps.com)
> On 05/27/2023 6:00 AM EDT lazarus-request at lists.lazarus-ide.org wrote:
>
>
> Send lazarus mailing list submissions to
> lazarus at 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-request at lists.lazarus-ide.org
>
> You can reach the person managing the list at
> lazarus-owner at 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 (wkitty42 at windstream.net)
> 2. Re: locate command for dBase (Michael Van Canneyt)
> 3. Re: locate command for dBase (wkitty42 at windstream.net)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 26 May 2023 07:26:28 -0400
> From: wkitty42 at windstream.net
> To: lazarus at lists.lazarus-ide.org
> Subject: Re: [Lazarus] locate command for dBase
> Message-ID: <e6adba1f-2478-cbda-c12e-ada039783479 at windstream.net>
> 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 <michael at freepascal.org>
> To: wkitty42--- via lazarus <lazarus at lists.lazarus-ide.org>
> Subject: Re: [Lazarus] locate command for dBase
> Message-ID: <alpine.DEB.2.22.394.2305261330270.647924 at home>
> 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: wkitty42 at windstream.net
> To: lazarus at lists.lazarus-ide.org
> Subject: Re: [Lazarus] locate command for dBase
> Message-ID: <9a06d191-09f2-2844-cac4-ed68b75dcc24 at 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 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.
>
>
> ahhhh... i thought it just located whatever is being sought and one still needed
> to actually seek to the record...
>
> > But without more info/code it is difficult to give an answer to the OP's
> > question.
>
> agreed :)
>
> --
> NOTE: No off-list assistance is given without prior approval.
> *Please keep mailing list traffic on the list where it belongs!*
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> --
> _______________________________________________
> lazarus mailing list
> lazarus at lists.lazarus-ide.org
> https://lists.lazarus-ide.org/listinfo/lazarus
>
>
> ------------------------------
>
> End of lazarus Digest, Vol 184, Issue 9
> ***************************************
More information about the lazarus
mailing list