[Lazarus] MySQL table won't update.

Larry Dalton larrydalton71 at gmail.com
Mon Apr 9 19:55:37 CEST 2018


I am using the following: Linux Mint 17, MySQL 5.5, Lazarus 1.6.2 64 bit.

Problem: MySQL Database BankOfAmerica, table Checking won't hold an update.
I can update the data in the dbedits or in the dbgrid. When I press refresh
button on BOAGator it pulls up the original data and eliminates any new
rows. Same thing when I close the form out and re-open it. What step am I
missing?


Source code:
 unit CheckingUnit;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, mysql55conn, sqldb, db, FileUtil, Forms, Controls,
  Graphics, Dialogs, ExtCtrls, Buttons, DbCtrls, DBGrids, StdCtrls,
DBExtCtrls;

type

  { TCheckingForm }

  TCheckingForm = class(TForm)
    CloseButton: TBitBtn;
    BOAConnection: TMySQL55Connection;
    BoaSource: TDataSource;
    BOAQuery: TSQLQuery;
    BoaTransaction: TSQLTransaction;
    BOAGator: TDBNavigator;
    BOAGrid: TDBGrid;
    CheckNumMemo: TDBMemo;
    CheckToMemo: TDBMemo;
    EditBalance: TDBEdit;
    EditReceived: TDBEdit;
    EditSpent: TDBEdit;
    EditEntryDate: TDBDateEdit;
    EditTransaction: TDBEdit;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    StatusPanel: TPanel;
    ToolPanel: TPanel;
    procedure CloseButtonClick(Sender: TObject);
    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  CheckingForm: TCheckingForm;

implementation

{$R *.lfm}

{ TCheckingForm }

procedure TCheckingForm.CloseButtonClick(Sender: TObject);
begin
  Close;
end;

procedure TCheckingForm.FormClose(Sender: TObject; var CloseAction:
TCloseAction
  );
begin
   CloseAction:=cafree;
end;

end.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180409/fc0b7d3a/attachment.html>


More information about the Lazarus mailing list