Hallo,
ich habe ein Problem mit der erstellung einer
Paradox 7 Tabelle zur Laufzeit. Und zwar kommt immer ein Fehler. "Merkmal nicht verfügbar." Hat jemand eine Idee woran das liegen kann??? Ich schicke einfach mal meinen Code mit.
Delphi-Quellcode:
Table1.Active:=False;
Table1.DatabaseName:='DBDEMOS';
Table1.TableType:=ttParadox;
Table1.TableName:=ExtractFilePath(Application.ExeName) + '\Temp.db';
if not Table1.Exists then Table1.DeleteTable;
Table1.FieldDefs.Clear;
Table1.FieldDefs.AddFieldDef.Name:='Idx';
Table1.FieldDefs.AddFieldDef.DataType:=ftInteger;
Table1.FieldDefs.AddFieldDef.Required:=True;
Table1.FieldDefs.AddFieldDef.Name:='F01';
Table1.FieldDefs.AddFieldDef.DataType:=ftString;
Table1.FieldDefs.AddFieldDef.Size:=1;
Table1.FieldDefs.AddFieldDef.Name:='F02';
Table1.FieldDefs.AddFieldDef.DataType:=ftString;
Table1.FieldDefs.AddFieldDef.Size:=5;
Table1.FieldDefs.AddFieldDef.Name:='F03';
Table1.FieldDefs.AddFieldDef.DataType:=ftString;
Table1.FieldDefs.AddFieldDef.Size:=1;
Table1.FieldDefs.AddFieldDef.Name:='F04';
Table1.FieldDefs.AddFieldDef.DataType:=ftString;
Table1.FieldDefs.AddFieldDef.Size:=6;
Table1.FieldDefs.AddFieldDef.Name:='F05';
Table1.FieldDefs.AddFieldDef.DataType:=ftString;
Table1.FieldDefs.AddFieldDef.Size:=7;
Table1.FieldDefs.AddFieldDef.Name:='F06';
Table1.FieldDefs.AddFieldDef.DataType:=ftString;
Table1.FieldDefs.AddFieldDef.Size:=6;
Table1.FieldDefs.AddFieldDef.Name:='F07';
Table1.FieldDefs.AddFieldDef.DataType:=ftString;
Table1.FieldDefs.AddFieldDef.Size:=100;
Table1.FieldDefs.AddFieldDef.Name:='Status';
Table1.FieldDefs.AddFieldDef.DataType:=ftString;
Table1.FieldDefs.AddFieldDef.Size:=1;
Table1.IndexDefs.Clear;
Table1.IndexDefs.AddIndexDef.Name:='';
Table1.IndexDefs.AddIndexDef.Fields:='Idx';
Table1.IndexDefs.AddIndexDef.Options:=[ixPrimary];
Table1.CreateTable;
Mit freundlichen Grüßen
Christian18