if (not DirectoryExists(ExtractFilePath(Application.ExeName)))or<br> (not FileExists(ExtractFilePath(Application.ExeName)+'Test.DBF'))<br> then<br> begin<br> if not DirectoryExists(ExtractFilePath(Application.ExeName)) then<br> CreateDirectory(Pchar(ExtractFilePath(Application.ExeName)),<br> nil);<br> Table1.DatabaseName:=ExtractFilePath(Application.ExeName);<br> with Table1 do<br> begin<br> Active:=False;<br> TableType:=ttFoxPro;<br> TableName:='Test.dbf';<br> with FieldDefs do<br> begin<br> Clear;<br> with AddFieldDef do<br> begin<br> Name:='TestField1';<br> DataType:=ftString;<br> Size:=10;<br> end;<br> with AddFieldDef do<br> begin<br> Name:=''TestField2'';<br> DataType:=ftString;<br> Size:=15;<br> end;<br> with AddFieldDef do<br> begin<br> Name:=''TestField3'';<br> DataType:=ftString;<br> Size:=1;<br> end;<br> with AddFieldDef do<br> begin<br> Name:=''TestField4'';<br> DataType:=ftString;<br> Size:=8;<br> end;<br> with AddFieldDef do<br> begin<br> Name:=''TestField5'';<br> DataType:=ftBCD;<br> Size:=20;<br> Precision:=1;<br> end;<br> with AddFieldDef do<br> begin<br> Name:=''TestField6'';<br> DataType:=ftString;<br> Size:=1;<br> end;<br> with IndexDefs do<br> begin<br> Clear;<br> with AddIndexDef do<br> begin<br> Name:=''TestField1'';<br> Fields:=''TestField1'';<br> end;<br> with AddIndexDef do<br> begin<br> Name:=''TestField2'';<br> Fields:=''TestField2'';<br> end;<br> with AddIndexDef do<br> begin<br> Name:=''TestField3'';<br> Fields:=''TestField3'';<br> end;<br> with AddIndexDef do<br> begin<br> Name:=''TestField4'';<br> Fields:=''TestField4'';<br> end;<br> end;<br> CreateTable;<br> end;<br><br> end;<br><br> Table1.Close;<br> Table1.DatabaseName:=ExtractFilePath(Application.ExeName);//+DBComboBoxEh1.Text;<br> Table1.Open;<br> while not Table1.eof do<br> begin<br> //<br> ................................<br> //<br> Table1.next;<br> end;