RE:como agrego un registro a una tabla?
no me lo guarda jose.. no se donde esta mi error, mira aqui te pongo el codigo:
la tabla es: Tindicae
el campo a agregar es: Dacd, el cual es calculado en el findfields
insertquery, findfields: query
sqlline: string
while Not FindFields.EOF do
begin
try
SqlLine := 'Insert into tindicae(dacd) ''' + FindFields.FieldByName('dacd').AsString +'';
SqlLine := 'Insert into tindicae(dacd) d';
InsertQuery := TQuery.Create(Nil);
InsertQuery.DataBaseName := DataSic.DBSic.DatabaseName;
InsertQuery.Sql.Add(SqlLine);
InsertQuery.ExecSQL;
InsertQuery.close;
InsertQuery.free;
except
Application.MessageBox('Datos incorrectos en Alta de findfields(SQL)...', 'Error !!', mb_Ok + mb_IconError);
break;
end;
FindFields.Next;
end;
gracias por todo