Autor Beitrag
Stoffel1984
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 219

Win NT, Win 2000
D6 Prof
BeitragVerfasst: Do 13.02.03 19:43 
Hallo, ich bin am verzweifeln.
Will ein Index für eine Paradox Table erstellen, funktioniert nur nicht.
Weis jemand wo hier der Fehler ist?

Gruß STOFFEL

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
procedure TKundendaten.Suche_NrChange(Sender: TObject);
begin 
  with Table1 do
  begin
    add('Nummernindex','Nr.',[ixPrimary,ixUnique]);
    SetKey;
    FieldByName('Nr.').AsString := Suche_nr.text;
    TABLE1.GotoNearest
  end;
end;


Moderiert von user profile iconTino: Titel geändert.
Shmidt_dlt
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23



BeitragVerfasst: So 16.02.03 11:35 
Titel: Indexerstellung
Probier es doch mal mit den Befehlen
ausblenden Quelltext
1:
Table1.Addindex;					

im übrigen kannst du kein feld in einer Paradoxdatenbank anlegen das einen "." enthält

mfg
Stephan

Moderiert von user profile iconTino: Code-Tags hinzugefügt.
RedHorse
Hält's aus hier
Beiträge: 1



BeitragVerfasst: Mo 03.03.03 10:03 
Titel: Titel: Fehler bei der Index Erstellung (Paradox Tabelle)
Hallo Stoffel1984,

Versuche es mal so, wie unten:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
  table1.Active := False;

  with table1.IndexDefs do begin
    Clear;
    with AddIndexDef do begin
      Name := ''; (Primärindex)
      Fields := 'lfnr'; (Feldname)
      Options := [ixPrimary];
    end;
    with AddIndexDef do begin
      Name := 'liefn'; (Sekundärindex)
      Fields := 'FirmaName1'; (Feldname)
      Options := [ixCaseInsensitive];
    end;
  end;
  table1.Active := True;
  table1.IndexDefs.Update;


Mit freundlichen Grüssen

RedHorse

Moderiert von user profile iconTino: Code-Tags hinzugefügt.

_________________
Ich bin ein neuling