Board index » delphi » Cannot read DBase III file I created

Cannot read DBase III file I created

Here is the code I use to create a DBase III file.
But I cannot read the issued file with any soft.

          Table1.Active:=False;
          Table1.TableName:=FichNacreer;
          Table1.Tabletype:=ttDBase;
          Table1.DataBaseName:='c:\SaisieRS\';
          with Table1.FieldDefs do
          begin
               Clear;
               Add ('ACT',ftstring,1,False);
               Add ('NOM',ftstring,20,False);
               Add ('PRE',ftstring,25,False);
               Add ('AGE',ftstring,4,False);
               Add ('ORIG',ftstring,25,False);
               Add ('DE',ftstring,2,False);
               Add ('NOMPER',ftstring,20,False);
               Add ('PREPER',ftstring,25,False);
               Add ('ET',ftstring,2,False);
               Add ('NOMMER',ftstring,20,False);
               Add ('PREMER',ftstring,25,False);
               Add ('DATEREP',ftstring,10,False);
               Add ('DATEGRE',ftstring,10,true);
               Add ('REMARQ',ftstring,50,False);
               Add ('REF',ftstring,12,False);
          end;
          Table1.CreateTable;
          Table1.Open;
          Table1.append;

Can you help me please ?
Thanks.

 

Re:Cannot read DBase III file I created


Quote
>ere is the code I use to create a DBase III file.
>But I cannot read the issued file with any soft.

If this is Delphi 4 try adding the following line to specify a tablelevel
or change the default tableLevel in your BDE config

          table1.TableLevel = 5

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:Cannot read DBase III file I created


On Sat, 18 Sep 1999 22:29:15 +0200, Jean-Claude BRUEL

Quote
<jcbr...@geneanet.org> wrote:
>Here is the code I use to create a DBase III file.
>But I cannot read the issued file with any soft.

>          Table1.Active:=False;
>          Table1.TableName:=FichNacreer;
>          Table1.Tabletype:=ttDBase;

            Table1.TableLevel := 3;
Quote
>          Table1.DataBaseName:='c:\SaisieRS\';
>          with Table1.FieldDefs do
>          begin
>               Clear;
>               Add ('ACT',ftstring,1,False);
>               Add ('NOM',ftstring,20,False);
>               Add ('PRE',ftstring,25,False);
>               Add ('AGE',ftstring,4,False);
>               Add ('ORIG',ftstring,25,False);
>               Add ('DE',ftstring,2,False);
>               Add ('NOMPER',ftstring,20,False);
>               Add ('PREPER',ftstring,25,False);
>               Add ('ET',ftstring,2,False);
>               Add ('NOMMER',ftstring,20,False);
>               Add ('PREMER',ftstring,25,False);
>               Add ('DATEREP',ftstring,10,False);

//               Add ('DATEGRE',ftstring,10,true);
                 Add ('DATEGRE',ftstring,10,False);

Quote
>               Add ('REMARQ',ftstring,50,False);
>               Add ('REF',ftstring,12,False);
>          end;
>          Table1.CreateTable;
>          Table1.Open;
>          Table1.append;

HTH,

Jan

Other Threads