« on: December 09, 2025, 12:30:40 pm »
I trying to change some value in mariadb by procedure my code in lazarus is
[code=pascal]
procedure TForm6.SpeedButton1Click(Sender: TObject);
begin
ZQuery2.Close;
ZQuery2.SQL.Text:='CALL `comeback`(:bckin, :id, :bckto)';
ZQuery2.ParamByName('bckin').AsDate:=DateTimePicker1.Date;
ZQuery2.ParamByName('bckto').AsString:=ComboBox1.Text;
ZQuery2.ParamByName('id').AsInteger:=ZQuery1.FieldByName('id').AsInteger;
ZQuery2.ExecSQL;
Form6.Activate;
end;
[/code]
and the procedure code in mariadb is
CREATE DEFINER=`root`@`localhost` PROCEDURE `comeback`(
IN `bckin` DATE,
IN `id` INT,
IN `bckto` VARCHAR(50)
)
LANGUAGE SQL
DETERMINISTIC
CONTAINS SQL
SQL SECURITY DEFINER
COMMENT ''
BEGIN
UPDATE maintenence SET maintenence.back_in_date=bckin,maintenence.back_to=bckto WHERE maintenence.id=id;
END
If I called it from Heidisql ,It works well but from lazarus doesn't work and no errors appeare.
« Last Edit: December 09, 2025, 01:04:42 pm by Gebo »

Logged
I like programming I begun by vb,vb.net,c# and finally free pascal and lazarus .I like martial arts sports and I am a kickboxer and made our team sport club called black eagle school I have a website for modern clothes..