codruta1990
Programmer
Hy
I need some help with my insert into sql command:
I want to insert into a database(Access) some values taken from some textboxes.
My code is the folowing:
procedure Tfrm_AdaugareClienti.Button1Click(Sender: TObject);
var s:string;
begin
s:='Insert into Clienti values('+ Edit1.Text + ',"'+ Edit2.Text + '","' + Combobox1.Text+'","' + Edit3.Text + '","' + Edit4.Text + '","' + Edit5.Text + '","' + Edit6.Text + '","' + Edit7.Text + '","' + Edit8.Text + '","' + Edit9.Text + '","' + Edit10.Text + '")';
showmessage(s);
Adoquery1.SQL.clear;
Adoquery1.SQL.Add(s);
Adoquery1.ExecSQL ;
I just can't understand what's the problem...My database has 11 fields, the firs one is number and the other ones are text...
Codruta
I need some help with my insert into sql command:
I want to insert into a database(Access) some values taken from some textboxes.
My code is the folowing:
procedure Tfrm_AdaugareClienti.Button1Click(Sender: TObject);
var s:string;
begin
s:='Insert into Clienti values('+ Edit1.Text + ',"'+ Edit2.Text + '","' + Combobox1.Text+'","' + Edit3.Text + '","' + Edit4.Text + '","' + Edit5.Text + '","' + Edit6.Text + '","' + Edit7.Text + '","' + Edit8.Text + '","' + Edit9.Text + '","' + Edit10.Text + '")';
showmessage(s);
Adoquery1.SQL.clear;
Adoquery1.SQL.Add(s);
Adoquery1.ExecSQL ;
I just can't understand what's the problem...My database has 11 fields, the firs one is number and the other ones are text...
Codruta