Ver Mensaje Individual
  #1  
Antiguo 17-11-2005
Gabriel2 Gabriel2 is offline
Miembro
 
Registrado: sep 2004
Posts: 108
Reputación: 20
Gabriel2 Va por buen camino
Crear índice en runtime

Para crear una tabla paradox en tiempo de ejecución utilizó un código similar a este:

Código Delphi [-]
 procedure TForm1.Button1Click(Sender:TObject);
 begin 
   if not Table1.Exists then 
   begin 
     Table1.Active       := FALSE; 
     Table1.DatabaseName := 'Alias'; 
     Table1.TableType    := ttParadox; 
     Table1.TableName    := 'Nombre de la Tabla'; 
     with Table1.FieldDefs do 
     begin 
       Clear; 
       Add('IntegerField', ftInteger,  0, FALSE); 
       Add('StringField' , ftString , 30, FALSE); 
       Add('LogicalField', ftBoolean,  0, FALSE); 
       Add('FloatField'  , ftFloat  ,  0, FALSE); 
       Add('DateField'   , ftDate   ,  0, FALSE); 
       Add('TimeField'   , ftTime   ,  0, FALSE); 
     end; 
     Table1.CreateTable; 
   end; 
 end;
Lo que no he podido hacer es crear un índice... alguién sabe cómo...

Última edición por dec fecha: 17-11-2005 a las 21:44:04. Razón: ¡¡Encerrad el código fuente entre las etiquetas [DELPHI] ... [/DELPHI]!!
Responder Con Cita