Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #2  
Antiguo 02-06-2003
FRANKER FRANKER is offline
Miembro
 
Registrado: may 2003
Ubicación: Elche
Posts: 71
Poder: 23
FRANKER Va por buen camino
Arrow

Hola:

Para Asignar un índice a una tabla tienes que modificar su propieda indexname:
Código:
 Table1.indexname := 'nombreIndice';
si tienes todos los indices en un comboBox se quedaría mas o menos asi :
Código:
 Table1.indexname := ComboBox.Text;
Para posicionarte en el registro que más se parece a una condición puedes usar el método FindNearest del TTable.
Aqui te dejo un trozo de texto extraído de la ayuda de Delphi 5:
Cita:
The following example performs an incremental search on a table. The form contains a db grid, an edit box, a data source, and a table. As the user types in the edit box, the cursor of the grid moves to the nearest match in the table.
Código:
procedure TForm1.FormActivate(Sender: TObject);

begin
  Table1.DatabaseName := 'DBDemos';
  Table1.TableName := 'Customer.db';
  Table1.Active := True;
  Table1.IndexName := 'ByCompany';
end;

procedure TForm1.Edit1Change(Sender: TObject);

begin
    Table1.FindNearest([Edit1.Text]);
end;
Saludos y Suerte!!.
__________________
.:.::FRANKER::.:.
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 00:18:12.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi