Hi all,
I have a problem with the database. I just want to insert a data.
The contents of the simple database is;
id - int(10) not null, auto increment
name - varchar(45)
So here is my insert code;
try
with SQLQuery1 do
begin
close;
prepare;
Params[1].Asstring:=DBEdit1.Text;
execsql;
end;
except
on E: EDatabaseError do
Messagedlg(E.Message, mtInformation, [mbok], 0);
end;
and my InsertSQL's property
INSERT INTO example (id,bscname) VALUES (:id, :bscname)
So when I try to insert a data, I get this error.
Project project1 raised exception class 'EListError' with message:
List index (1) out of bounds
Thanks