Hello all...
I have a problem here related to database. I try to save data from form into MySQL. Here my code
procedure TForm1.Button1Click(Sender: TObject);
var
idid, addresss, dsql: string;
begin
idid := id.Text;
addresss := address.Text;
showmessage(idid);
showmessage(addresss);
dsql := 'insert into bidata (id, name) ';
dsql := dsql + 'values (';
dsql := dsql + '''' + idid + '''' + ', ';
dsql := dsql + '''' + addresss + '''' + ')';
quri.SQL.Add(dsql);
quri.ExecSQL;
datasource1.DataSet.Open;
end;
I use TQuery and T DataSource for this.
Error message is "BDEEngineError, error in SQL statement near insert in to........".
Can someone help on this...plz
TQ
I have a problem here related to database. I try to save data from form into MySQL. Here my code
procedure TForm1.Button1Click(Sender: TObject);
var
idid, addresss, dsql: string;
begin
idid := id.Text;
addresss := address.Text;
showmessage(idid);
showmessage(addresss);
dsql := 'insert into bidata (id, name) ';
dsql := dsql + 'values (';
dsql := dsql + '''' + idid + '''' + ', ';
dsql := dsql + '''' + addresss + '''' + ')';
quri.SQL.Add(dsql);
quri.ExecSQL;
datasource1.DataSet.Open;
end;
I use TQuery and T DataSource for this.
Error message is "BDEEngineError, error in SQL statement near insert in to........".
Can someone help on this...plz
TQ