Dicho de otra forma:
Código Delphi [-]
procedure Tform1.Combo1KeyUp(var key:word....);
var q:Tquery;
begin
if key = vk_return then if combo1.items.indexof(combo1.text) = -1 then begin
q := Tquery.Create(nil);
try
q.DatabaseName := como se llame...
q.Database := MiDatabase;
q.sql.text := ' insert into mitabla (Ciudad) values ('+ quotedstr(combo1.text)+ ');';
q.ExecSql; finally
freeandnil(q);
end;
end;
Saludos
__________________
Si usted entendió mi comentario, contácteme y gustosamente,
se lo volveré a explicar hasta que no lo entienda, Gracias.
|