Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2018-04

MySQL table won't update.

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Larry Dalton

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>

Reply by email

larrydalton71
to Graeme Geldenhuys

Apparently wiki.lazarus.freepascal is down. I can't get to the tutorial.

Sent from my Verizon, Samsung Galaxy smartphone
-------- Original message --------From: Graeme Geldenhuys via Lazarus Date: 4/9/18 15:39 (GMT-05:00) To: Cc: Graeme Geldenhuys Subject: Re: [Lazarus] MySQL table won't update.

Larry Dalton wrote
What step am I missing?

Probably missing the ApplyUpdates() call - to send all local updates to the DB server.

Regards,
  Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key:  http://tinyurl.com/graeme-pgp --

Reply by email