Hi to all!
I'm trying mysql with my first app!
I've a problem with the connection to db, in particular I've a access violation error when I try to make an insert query!
I use mysql 4.1 and lazarus 0.9.13.
Yo make connection I use the components under SQLdb!
This is the code:
MySQLConnection1.HostName := 'localhost';
MySQLConnection1.UserName := 'root';
MySQLConnection1.Password := 'my_pw';
MySQLConnection1.DatabaseName := 'db_test';
pagamento:=DDpagamento.Text;
conto:=DDconto.Text;
MySQLConnection1.Open;
SQLQuery1.SQL.Text := 'INSERT INTO entrate (tipoconto,importo,data,descrizione,tipopagamento) values (conto,TBimporto.Text,TBdata.Text,pagamento)';
SQLQuery1.ExecSQL;
SQLQuery1.Close;
MySQLConnection1.Close;
Thanks!