Re: [Lazarus] lazarus Digest, Vol 191, Issue 9; DbNavigator Posting

2023-12-12 Thread john Ward via lazarus
I have experienced similar Problems, there doesn't seem to be an accurate 
connection between DbEdit fields used on a form and what is written to the Data 
Base.  I have upper case on Fields but in the Data base (Dbase) the fields are 
lower case.

> On 12/10/2023 12:11 PM EST 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: Dbnavigator won't post to MSACESS db (Larry Dalton)
>2. Re: Dbnavigator won't post to MSACESS db (Michael Van Canneyt)
>3. Lazarus 2.2.6 on Raspberry Pi5B, error during build (Bo Berglund)
>4. Re: Lazarus 2.2.6 on Raspberry Pi5B, error during build
>   (Maxim Ganetsky)
>5. Re: Lazarus 2.2.6 on Raspberry Pi5B, error during build
>   (Mehmet Erol Sanliturk)
> 
> 
> --
> 
> Message: 1
> Date: Sun, 10 Dec 2023 09:42:01 -0500
> From: Larry Dalton 
> To: Lazarus mailing list 
> Subject: Re: [Lazarus] Dbnavigator won't post to MSACESS db
> Message-ID: <522c0621-877f-4922-b700-60cd560dc...@gmail.com>
> Content-Type: text/plain; charset=utf-8
> 
> In my written code, yes. And I have no problems writing to the table that 
> way. But using the Dbnavigator post button won?t work.
> Sent from my iPhone
> 
> > On Dec 10, 2023, at 03:29, Michael Van Canneyt via lazarus 
> >  wrote:
> > 
> > ?
> > 
> >> On Fri, 8 Dec 2023, Larry Dalton via lazarus wrote:
> >> 
> >> I am using lazarus v2.2.6 on Windows 11.
> >> The form uses the following components:
> >> MBCCGator: TDBNavigator;
> >>  MBCCGrid: TDBGrid;
> >>  MBCCSource: TDataSource;
> >>  MBCC_Connector: TODBCConnection;
> >>  MBCCQuery: TSQLQuery;
> >>  MBCC_Trans: TSQLTransaction;MBCCQuery: TSQLQuery;
> >>  also includes several TDBEdits.
> >> 
> >>  It connects to an MSAccess Database, with a table named MBCC_2023.
> >> I have no trouble accessing the database, and reading the records. I can
> >> use MBCCGator to navigate the database. However, it will NOT post a new
> >> record or a changed record to the  table. I don't get any error codes. It
> >> just won't  store. Help is requested.
> > 
> > Are you calling applyupdates and committing the transaction ?
> > 
> > Michael.
> > --
> > ___
> > lazarus mailing list
> > lazarus@lists.lazarus-ide.org
> > https://lists.lazarus-ide.org/listinfo/lazarus
> 
> 
> --
> 
> Message: 2
> Date: Sun, 10 Dec 2023 17:07:12 +0100 (CET)
> From: Michael Van Canneyt 
> To: Larry Dalton via lazarus 
> Subject: Re: [Lazarus] Dbnavigator won't post to MSACESS db
> Message-ID: 
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
> 
> 
> 
> On Sun, 10 Dec 2023, Larry Dalton via lazarus wrote:
> 
> > In my written code, yes. And I have no problems writing to the table that 
> > way. But using the Dbnavigator post button won?t work.
> 
> Then I suspect that is your problem.
> The Dbnavigator post button only does a post, never ApplyUpdates and 
> transaction commit.
> 
> The ApplyUpdates can be automated with the sqoAutoApplyUpdates option of the
> TSQLQuery, but the transaction commit should be implemented for example in the
> AfterApplyUpdates event.
> 
> Michael.
> 
> > Sent from my iPhone
> >
> >> On Dec 10, 2023, at 03:29, Michael Van Canneyt via lazarus 
> >>  wrote:
> >> 
> >> ?
> >> 
> >>> On Fri, 8 Dec 2023, Larry Dalton via lazarus wrote:
> >>> 
> >>> I am using lazarus v2.2.6 on Windows 11.
> >>> The form uses the following components:
> >>> MBCCGator: TDBNavigator;
> >>>  MBCCGrid: TDBGrid;
> >>>  MBCCSource: TDataSource;
> >>>  MBCC_Connector: TODBCConnection;
> >>>  MBCCQuery: TSQLQuery;
> >>>  MBCC_Trans: TSQLTransaction;MBCCQuery: TSQLQuery;
> >>>  also includes several TDBEdits.
> >>>
> >>>  It connects to an MSAccess Database, with a table named MBCC_2023.
> >>> I have no trouble accessing the database, and reading the records. I can
> >>> use MBCCGator to navigate the database. However, it will NOT post a new
> >>> record or a changed record to the  table. I don't get any error codes. It
> >>> just won't  store. Help is requested.
> >> 
> >> Are you calling applyupdates and committing the transaction ?
> >> 
> >> Michael.
> >> --
> >> ___
> >> lazarus mailing list
> >> lazarus@lists.lazarus-ide.org
> >> https://lists.lazarus-ide.org/listinfo/lazarus
> > -- 
> > ___
> > lazarus mailing list
> 

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

2023-05-30 Thread john Ward via lazarus
To,
Werner Pamler,

Thank you very much for your Sample, the Publishers of the Lazarus Handbook, 
should think of including it as a sample, clear, concise and the sample worked. 
 I downloaded, compiled and tested it and it worked, BUT mine that looked like 
yours didn't.

I tried to focus on the difference, and I found you used the TDBgrid and I use 
the TDBedit to display the DataBase data on the form.  I had already tried the 
dbase.post command after the 'locate' command and found No difference, so I 
tried the dabase.edit command and SUCCESS!

So we have discovered either a BUG or a 'feature' of Lazarus!

Again I thank you, without your help the development was stopped.
Congratulations and thank you the help given, great job.

Also thanks again to Wkitty and Michael you both gave information needed to 
solve the problem I was having.

John
 
> On 05/28/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 (Werner Pamler)
>2. Re: lazarus Digest, Vol 184, Issue 9 (john Ward)
> 
> 
> --
> 
> Message: 1
> Date: Sat, 27 May 2023 20:07:59 +0200
> From: Werner Pamler 
> To: lazarus@lists.lazarus-ide.org
> Subject: Re: [Lazarus] locate command for dBase
> Message-ID: 
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
> 
> The attached project demonstrates that dbf.Locate works as expected.
> 
> -- next part --
> A non-text attachment was scrubbed...
> Name: dbf_locate.zip
> Type: application/x-zip-compressed
> Size: 2657 bytes
> Desc: not available
> URL: 
> <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20230527/5e01cf66/attachment-0001.bin>
> 
> --
> 
> Message: 2
> Date: Sat, 27 May 2023 18:16:28 -0400 (EDT)
> From: john Ward 
> To: lazarus@lists.lazarus-ide.org
> Subject: Re: [Lazarus] lazarus Digest, Vol 184, Issue 9
> Message-ID:
>   <20858333.2481738.1685225788...@webmail-oxcs.networksolutionsemail.com>
>   
> Content-Type: text/plain; charset=UTF-8
> 
> 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)
>

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.
> 
> ---

[Lazarus] locate command for dBase

2023-05-25 Thread john Ward via lazarus
I need to find records in an indexed dBase file based on a key.
version is 2.2.6 fpc 3.2.2  x86_64.
 
The following is the test I did in the program. The dBase file is temp.dbf and 
the index if temp.mdx; The program includes tDbf and tDatasource. I also have 
tDbnavigator in the program, all seems to be working, adding, editing records. 
I need to be able to 'find' a
record in the data base, so editing can be done, without going through record 
by record.
 
procedure Ttempf.Edit1Exit(Sender: TObject);
var
   tempid : string;
   tno : string;
begin
 tempid := edit1.text;
 
  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.
 
Driving myself crazy trying to find problem, It is a short drive, many times.
any Help would be appreciated.
 
j...@mbstemps.com
 

John A. Ward, President

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


[Lazarus] runcommand doesn't work?

2023-03-09 Thread john Ward via lazarus
I have a program, segment included below, that partially works.  The first 
'runcommand' example works, but the 2nd doesn't?
 
If I type the lp command line, it prints perfectly..
 
 if RunCommand('unix2dos', ['-n', '-f', 
'/mbs/mbs/file/cust.f','/mbs/mbs/file/cust.frm'],s) then
 writeln(s);
  if RunCommand('/bin/lp', ['-d', ' printer1','-o=raw' 
,'/mbs/mbs/file/cust.frm'], s) then
  writeln(s);
  errormsg.text := 'We are done with runcommand now s= '+ s;

 
Fedora 37, Lazarus 2.2.4 FPC 3.2.2  X64 Linux gtk2

John A. Ward, President

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