I need an example
Posted: 29.09.2007, 22:54
HI to all, i'm starting with Zeos and i cant insert into a database using a Zquery component, i used this code:
the table name is CLIENTES and have 3 fiels:
id: primary key and autoincrement
nombre: char 20
apellido: char 20
the error i get says column unknown NOMBRE
can someone tellme whats wrong???
Code: Select all
With ZQuery1 do Begin
Sql.Clear;
Sql.Add('INSERT INTO CLIENTES (nombre, apellido) VALUES (:val1, :val2)');
ZQuery1.ParamByName('val1').AsString:='xxxxx';
ZQuery1.ParamByName('val2').AsString:='yyyyy';
ExecSql;
End;
id: primary key and autoincrement
nombre: char 20
apellido: char 20
the error i get says column unknown NOMBRE
can someone tellme whats wrong???