Autor Beitrag
masteroffinalfantasy
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 82

Win XP
Delphi 2005 Architect
BeitragVerfasst: Di 24.05.05 13:07 
Hi Leute
ich hab ein prob:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
 AssignFile(Datei,combobox1.text+'.zp');
  rewrite(Datei); // Hier kommt der Fehler
  writeLn(Datei,zahl-1);
  for i:=1 to n-1 do
    begin
      WriteLn(Datei,note[i]);
      WriteLn(Datei,datum[i]);
      WriteLn(Datei,art[i]);
    end;

Also die Datei existiert auf jeden fall aber ich hab keine Peilung warum der Fehler kommt.
Wär nett wenn ihr mir helfen könntet!
thx im vorraus

Moderiert von user profile iconGausi: Code- durch Delphi-Tags ersetzt.
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Di 24.05.05 13:59 
combobox1.items[xxx] vielleicht
weil wenn die combobox nen #13#10 hitnen dran hat oder mehrere ordner/datei stehen wird der GANZE inhalt der combobox genommen, weshalb das wohl nicht existiert

_________________
wer andern eine grube gräbt hat ein grubengrabgerät
- oder einfach zu viel zeit
mirage228
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 338

Win 7 Prof.
Delphi 2005 Prof., Delphi 2010 Prof.
BeitragVerfasst: Di 24.05.05 15:05 
Hi,

soweit ich weiss ist der E/A Fehler 32 eine "Sharing Violation". Das heisst, dass die Datei noch in Benutzung ist. Du musst Dateien nach der Verwendung immer mit CloseFile schließen z.B.

mfG
mirage228

_________________
May the source be with you, stranger.