Ver Mensaje Individual
  #3  
Antiguo 28-02-2005
Avatar de AGAG4
AGAG4 AGAG4 is offline
Miembro
 
Registrado: ago 2004
Ubicación: Los Mochis, Sinaloa, México
Posts: 1.420
Reputación: 21
AGAG4 Va por buen camino
No me explique

Lo que pasa es que tengo este codigo en Delphi para Crear una Tabla DBF con sus respectivos campos:
Código Delphi [-]
    with Table do begin
      Active := False;
      DatabaseName := ExtractFileDir(edRutadbf.text);
      TableType := ttDBase;
      TableName := ExtractFileName(edRutadbf.text);
      if not Table.Exists then begin
        with FieldDefs do begin
          Clear;
          if Campo1.Text<>'' then begin
            with AddFieldDef do begin
              Name := Campo1.text;
              DataType := ftString;
              Size := 15;
    //          Required := True;
            end;
          end else begin
            ShowMessage('Para Importar, Debe de Escribir Nombre a Campo1');
            abort;
          end;
          if Campo2.Text<>'' then begin
            with AddFieldDef do begin
              Name :=Campo2.text;
              DataType := ftFloat;
            Size := 14;
            end;
          end else begin
            ShowMessage('Para Importar, Debe de Escribir Nombre a Campo2');
            abort;
          end;
          if Campo3.Text<>'' then begin
            with AddFieldDef do begin
              Name :=Campo3.text;
              DataType := ftFloat;
//              Size:=12;
            end;
          end;
        end;
        CreateTable;
....
Lo que quiero es especificar de cuantos ENTEROS y de Cuantas DECIMALES se conforman los campos de tipo ftFloat , es lo unico que ando investigando... no lo quiero hacer MANUALMENTE, si le pongo SIZE:=15 después de asignarle el tipo de dato me marca error "Invalid Field SIZE" solamente puedo asignarle un TAMAÑO a un Campo de tipo STRING.

Que tenga buen día ... y gracias por su respuesta.

Última edición por AGAG4 fecha: 28-02-2005 a las 19:06:36. Razón: Corrección
Responder Con Cita