yes, and even worse
i've updated the lazarus to the most recent version, and I started to get this error )in the attachment
Code for the main form
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, unit3, unit4, unit6;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
private
{ private declarations }
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
begin
Form3 := TForm3.Create(nil);
Form3.ShowModal;
Form3.Release;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
application.terminate
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
Form4 := TForm4.Create(nil);
Form4.ShowModal;
Form4.Release;
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
Form6 := TForm6.create(nil);
Form6.showmodal;
form6.release;
end;
end.
Code for the second form
unit Unit3;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, mysql50conn, sqldb, db, dbf, FileUtil, Forms, Controls,
Graphics, Dialogs, DbCtrls, DBGrids, ExtCtrls, StdCtrls;
type
{ TForm3 }
TForm3 = class(TForm)
Insert: TButton;
cancel: TButton;
ComboCluster: TComboBox;
Datasource1: TDatasource;
address: TLabeledEdit;
Cluster: TLabel;
lastrecordedwatercounter: TLabeledEdit;
buildingsize: TLabeledEdit;
landsize: TLabeledEdit;
Name: TLabeledEdit;
MySQL50Connection1: TMySQL50Connection;
SQLQuery1: TSQLQuery;
SQLQuery2: TSQLQuery;
SQLTransaction1: TSQLTransaction;
procedure cancelClick(Sender: TObject);
procedure InsertClick(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form3: TForm3;
implementation
{$R *.lfm}
{ TForm3 }
procedure TForm3.InsertClick(Sender: TObject);
begin
SQLQuery1.insert;
sqlquery1.fieldbyname('Name').Text:= Name.Text;
sqlquery1.fieldbyname('address').Text:= Address.Text;
SQLQuery1.Fieldbyname('cluster').text:= combocluster.text;
sqlquery1.fieldbyname('Landsize').Text:= Landsize.Text;
sqlquery1.fieldbyname('buildingsize').Text:= buildingsize.Text;
sqlquery1.fieldbyname('lstrcrdwatercounter').Text:= lastrecordedwatercounter.Text;
sqlquery1.post;
sqlquery1.applyupdates;
sqlquery1.refresh;
showmessage('new user has been made');
form3.close;
end;
procedure TForm3.cancelClick(Sender: TObject);
begin
Form3.close;
end;
end.
Code for the 3rd form:
unit Unit5;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, mysql50conn, sqldb, DB, FileUtil, Forms, Controls,
Graphics, Dialogs, StdCtrls, DBGrids;
type
{ TForm5 }
TForm5 = class(TForm)
edAlamat: TEdit;
Button1: TButton;
PemakaianAirTerakhir: TEdit;
Label1: TLabel;
Label2: TLabel;
MySQL50Connection1: TMySQL50Connection;
SQLQuery1: TSQLQuery;
SQLTransaction1: TSQLTransaction;
procedure Button1Click(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form5: TForm5;
implementation
{$R *.lfm}
{ TForm5 }
procedure TForm5.Button1Click(Sender: TObject);
begin
with SQLQuery1 do
begin
close;
sql.clear;
sql.add('INSERT INTO trans(Ad,date,total)VALUES((SELECT M.address FROM master AS M WHERE M.address = edAddress),CURRENT_TIMESTAMP,(SELECT((M.land*RM.landrate)+(M.home*RM.buildingrate))FROM Master AS M,maintenance AS RM WHERE M.Cluster = RM.Cluster AND M.Address=edAddress)');
params.parambyname('Address').AsString := Address.text;
open;
end;
end;
end.
those are the codes, so far
but the new error makes everything fail...
i can't compile anything, and i'm stuck on the edit only, cannot run tests anymore