Hola feliz-58.
Código Delphi
[-]
procedure TForm1.DeleteTable(const TableName: string);
const
MSG = '¡Atención! se borrará la tabla %s ¿ Continua ?';
begin
if MessageBox(Handle, PChar(Format(MSG,[TableName])), '', MB_ICONWARNING+MB_YESNO) = IDYES then
with ADOQuery1 do
begin
Close;
SQL.Text := 'DROP TABLE ' + TableName;
ExecSQL;
end;
end;
Llamada ejemplo:
Código Delphi
[-]
if ComboBox1.ItemIndex > -1 then
DeleteTable(ComboBox1.Items[ComboBox1.ItemIndex]);
Saludos.