[Lazarus] Found a MySQL 5 example using ApplyUpdates -- but it doesn't actually work
Howard Lee Harkness
howard.lee.harkness at gmail.com
Sun Jun 15 04:36:58 CEST 2008
Ok, I tried calling ApplyUpdates, and I did not detect any difference. Could
you perhaps show me in the code below exactly WHERE I need to call
ApplyUpdates?
On Tue, May 27, 2008 at 5:00 AM, Joost van der Sluis <joost at cnoc.nl> wrote:
> That's true. You have to call 'TSQLQuery.ApplyUpdates' Then all changes
> in the local, in-memory changes-buffer are converted into
> update/insert/delete statements and executed on the underlying database.
>
> For those connections that do support transactions, you also have to do
> TSQLTransaction.Commit(Retaining).
>
unit Zipcode;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs,
mysql50conn, sqldb, db, DBGrids, DbCtrls;
type
{ TForm1 }
TForm1 = class(TForm)
Datasource1: TDatasource;
DBGrid1: TDBGrid;
DBNavigator1: TDBNavigator;
MySQL50Connection1: TMySQL50Connection;
SQLQuery1: TSQLQuery;
SQLTransaction1: TSQLTransaction;
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
initialization
{$I zipcode.lrs}
end.
--
Howard Lee Harkness
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20080614/47ff981c/attachment-0007.html>
More information about the Lazarus
mailing list