Einzelnen Beitrag anzeigen

Alf

Registriert seit: 3. Mai 2005
36 Beiträge
 
#3

Re: tabelle nimmt keine einträge an

  Alt 3. Mai 2005, 23:32
hi

hier mal die code

Delphi-Quellcode:
procedure TForm1.FormCreate(Sender: TObject);
begin
     //if not Table1.Exists then begin
      with Table1 do begin
           DatabaseName := 'F:\D_Project\Playdirect\St³ck1\';
           TableType := ttASCII;
           TableName := 'Player';
           with FieldDefs do begin
               Clear;

               with AddFieldDef do begin
                    Name := 'LfdNr';
                    DataType := ftInteger;
                    Required := True;
               end;
               with AddFieldDef do begin
                    Name := 'TrNr';
                    DataType := ftInteger;
                    Required := True;
               end;
               with AddFieldDef do begin
                    Name := 'Fin';
                    DataType := ftString;
                    Size := 3;
               end;
               with AddFieldDef do begin
                    Name := 'Tin';
                    DataType := ftInteger;
                    Required := True;
               end;
               with AddFieldDef do begin
                    Name := 'Dbi';
                    DataType := ftInteger;
                    Required := True;
               end;
               with AddFieldDef do begin
                    Name := 'Pathn';
                    DataType := ftString;
                    Size := 30;
               end;
               with AddFieldDef do begin
                    Name := 'TRACK NAME';
                    DataType := ftString;
                    Size := 15;
               end;
               with AddFieldDef do begin
                    Name := 'Next';
                    DataType := ftString;
                    Size := 4;
               end;
               with AddFieldDef do begin
                    Name := 'Fout';
                    DataType := ftString;
                    Size := 3;
               end;
               with AddFieldDef do begin
                    Name := 'Tout';
                    DataType := ftInteger;
                    Required := True;
               end;
               with AddFieldDef do begin
                    Name := 'Dbo';
                    DataType := ftInteger;
                    Required := True;
               end;
               with AddFieldDef do begin
                    Name := 'Stp';
                    DataType := ftString;
                    Size := 3;
               end;
           end;
          { with IndexDefs do begin
                Clear;
    //Der erste Index hat keinen Namen, denn er ist ein
    //primõrer Paradox-Schl³ssel
              { with AddIndexDef do begin
                    Name := '';
                    Fields := 'Player';
                    Options := [ixPrimary];
                end; }

               { with AddIndexDef do begin
                    //Name := '';
                    Name := 'LfdNrIdx';
                    Fields := 'LfdNr';
                    //Options := [ixPrimary];
                    Options := [ixCaseInsensitive];
                end;
                with AddIndexDef do begin
                    Name := 'TrNrIdx';
                    Fields := 'TrNr';
                    Options := [ixCaseInsensitive];
                end;
                with AddIndexDef do begin
                    Name := 'Finidx';
                    Fields := 'Fin';
                    Options := [ixCaseInsensitive];
                end;
                with AddIndexDef do begin
                    Name := 'Tinidx';
                    Fields := 'Tin';
                    Options := [ixCaseInsensitive];
                end;
                with AddIndexDef do begin
                    Name := 'Dbiidx';
                    Fields := 'Dbi';
                    Options := [ixCaseInsensitive];
                end;
                with AddIndexDef do begin
                    Name := 'Pathnidx';
                    Fields := 'Pathn';
                    Options := [ixCaseInsensitive];
                end;
                with AddIndexDef do begin
                    Name := 'TRACK NAMEidx';
                    Fields := 'TRACK NAME';
                    Options := [ixCaseInsensitive];
                end;
                with AddIndexDef do begin
                    Name := 'Nextidx';
                    Fields := 'Next';
                    Options := [ixCaseInsensitive];
                end;
                with AddIndexDef do begin
                    Name := 'Foutidx';
                    Fields := 'Fout';
                    Options := [ixCaseInsensitive];
                end;
                with AddIndexDef do begin
                    Name := 'Toutidx';
                    Fields := 'Tout';
                    Options := [ixCaseInsensitive];
                end;
                with AddIndexDef do begin
                    Name := 'Dboidx';
                    Fields := 'Dbo';
                    Options := [ixCaseInsensitive];
                end;
                with AddIndexDef do begin
                    Name := 'Stpidx';
                    Fields := 'Stp';
                    Options := [ixCaseInsensitive];
                end;


           end;}


           CreateTable;
           table1.close;

      end;
      with Table1 do begin
           DatabaseName := 'F:\D_Project\Playdirect\St³ck1\';
           TableType := ttASCII;
           TableName := 'Player';

           open;
           active:=true;
          //append;
          //insert;

          //for msec:=1 to 99 do
           begin
               insertrecord([1, 22,'<',400,30,'F:\Project','Datei','ext','>',300,0,'x']);
               //fieldvalues['LfdNr']:=1;
               //fieldvalues['TRACK NAME']:='longMusik';
               //post;
           end;
           table1.close;
       end;
end;
die ausdukomentierten sind versuche das irgendwie richtig zu machen, aber nix funct so richtig

ab den einfüge modus kommt entweder "index" fehler oder "Feldt" nicht vorhanden
  Mit Zitat antworten Zitat