Autor Beitrag
Jagg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 635



BeitragVerfasst: Do 12.12.02 10:09 
Kann mir jemand hierbei helfen? Ich habe so einen Code bekommen, aber daraus versteh ich nichts!

Wie ist die Syntax davon? Ist das nur eine Zeile ("das mit dem Packen") oder muss davor noch was gemacht werden? Kann mir jemand mal ein Beispiel geben?

Jagg !

(12.12. 09:16 Tino) Titel geändert.
wwerner
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 185



BeitragVerfasst: Do 12.12.02 10:12 
Hier steht alles was du machen mußt!

www.auq.de/viewtopic...?t=4833&start=11

_________________
Gruß

Wolfgang

----------
zu hause ist es doch am schönsten
Jagg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 635



BeitragVerfasst: Do 12.12.02 10:33 
ich habe so :
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
if Table1.FieldByName('UmlagNr').AsString = Edit1.Text then
      begin
        Table1.Close;
        Table1.Exclusive := True;
        Check(DbiPackTable(Table1.DBHandle,Table1.Handle,nil,szDBASE,True));
        Table1.Delete;
        inc(count);
      end;


.... er sagt dann die Fehlermeldung "ungültiges Funktion-Handle" !
Was bedeutet das ?

Jagg !
LCS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1305
Erhaltene Danke: 1

WIN 7, WIN 8
Delphi XE5, Delphi XE, Delphi 2007
BeitragVerfasst: Do 12.12.02 10:36 
Die Tabelle muss geöffnet sein.

Gruss Lothar

_________________
Der BH ist für die Brust, der Plan ist für'n Ar...
Jagg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 635



BeitragVerfasst: Do 12.12.02 10:47 
...aber wenn ich sie öffne dann sagt er "Operation bei geöffneter Datenmenge nicht ausführbar"

Jagg !
LCS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1305
Erhaltene Danke: 1

WIN 7, WIN 8
Delphi XE5, Delphi XE, Delphi 2007
BeitragVerfasst: Do 12.12.02 11:02 
Die Fehlermeldung muss nicht unbedingt vom Packen kommen. Ich würde sagen, dass der Code sowieso nicht gerade glücklich ist. Das Packen der Tabelle kann, abhängig von der Größe, ne ganze Zeit dauern. Du solltest das Packen der Tabelle am besten unmittelbar vor dem Programmende ausführen und auch nur dann, wenn tatsächlich Daten gelöscht wurden.

Beim Programmende:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
Table1.Close;
if  AnzahlGeloeschte > 0 then
  with Table1 do begin
    Exclusive := True;
    Active := True;
    if Active and Exclusive then
      Check(DbiPackTable(DBHandle, Handle, nil, szDBASE, True))
    else
      Fehlermeldung; 
  end;


Gruss Lothar

_________________
Der BH ist für die Brust, der Plan ist für'n Ar...