Autor Beitrag
x49
Hält's aus hier
Beiträge: 4



BeitragVerfasst: So 19.11.06 14:39 
Hallo Leutz,

ich habe problem mit indexDefs (Datenbank DBISAM)
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
procedure tdbupdate.primarykey_einfugen(isamtable:TDBISAMTABLE;
                                  name:string;
                                  const Fields:string;
                                  options:TIndexoptions;
                                  compression:tindexcompression);

begin
  //OK
 with isamtable do
  begin
    Active:=false;
    RestructureFieldDefs.Update;
    RestructureIndexDefs.Update;
    try
    RestructureindexDefs.Add(name,fields,options,compression);
    except
    exit;
    end;
    RestructureTable;
    Active:=true;
   end;
end;


Der fehler liegt bei Fields in add da sagt er incompatible typen tfields und tstring obwohl laut definition da ein const fields:string sein muss
das gleich problem ha ich mit addindexdefs.name
Udontknow
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2596

Win7
D2006 WIN32, .NET (C#)
BeitragVerfasst: So 19.11.06 15:41 
Hallo!

Das "With Isamtable" ist höchstwahrscheinlich schuld. Das hat nämlich auch eine Eigenschaft Fields vom Typ TFields, damit ist dann nicht mehr eindeutig, was du denn bei RestructureindexDefs.Add übergeben möchtest. Der Compiler entscheidet sich wohl für die Property des Objektes. Entferne einfach die with-Anweisung und ergänze die Aufrufe des Objektes eben um "Isamtable.".

Cu,
Udontknow
x49 Threadstarter
Hält's aus hier
Beiträge: 4



BeitragVerfasst: So 19.11.06 17:24 
Danke es funtzt

Big Thanks