Delphi Io Error 105
Contents |
105 with following code at the WriteLn. > var > txtFile: TextFile; > sFile:string; > begin > sFile := 'c:\temp\a.log'; > AssignFile(txtFile, sFile); > Rewrite(txtFile); > WriteLn(txtFile, DateTimeToStr(Now) + '- Start application');
Ioerror 105
> CloseFile(txtFile); > end; > I do not know why. The file is existing i/o error 105 and the rewrite for opening the > file seems to work. When I create a new project, it works. I also >
Delphi Io Error 103
copied the uses clause, but this doesn't work. Could it be that you are actually calling the wrong Rewrite, i.e. not System.Rewrite at all, but some method instead? -- Rudy Velthuis [TeamB] http://velthuis.homepage.t-online.de "When delphi io error 32 I am working on a problem I never think about beauty. I only think about how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." - Buckminster Fuller (1895-1983) Schlup Herber Delphi Developer Tue, 11 Dec 2007 20:19:14 GMT Re:i/o error 105 with WriteLn Dear all I get an error 105 with following code at the WriteLn. var runtime error 105 delphi txtFile: TextFile; sFile:string; begin sFile := 'c:\temp\a.log'; AssignFile(txtFile, sFile); Rewrite(txtFile); WriteLn(txtFile, DateTimeToStr(Now) + '- Start application'); CloseFile(txtFile); end; I do not know why. The file is existing and the rewrite for opening the file seems to work. When I create a new project, it works. I also copied the uses clause, but this doesn't work. Herbert Team Delphi Developer Wed, 12 Dec 2007 02:27:53 GMT Re:i/o error 105 with WriteLn QuoteIn article <42bbfa4...@newsgroups.borland.com>, Schlup Herbert wrote: > I get an error 105 with following code at the WriteLn. > var > txtFile: TextFile; > sFile:string; > begin > sFile := 'c:\temp\a.log'; > AssignFile(txtFile, sFile); > Rewrite(txtFile); > WriteLn(txtFile, DateTimeToStr(Now) + '- Start application'); > CloseFile(txtFile); > end; > I do not know why. The file is existing and the rewrite for opening the > file seems to work. When I create a new project, it works. Try to be explicit: var txtFile: System.Text; sFile:string; begin sFile := 'c:\temp\a.log'; System.Assign(txtFile, sFile); System.Rewrite(txtFile); System.WriteLn(txtFile, DateTimeToStr(Now) + '- Start application'); System.Close(txtFile); end; That removes any possible collision with names in other units. -- Peter Below (TeamB) Use the newsgroup archives : http://www.mers.com/searchsite.html http://www.tamaracka.com/search.htm http://groups.google.com http://www.prolix.be Scott Robert Delphi Developer Wed, 12 Dec 2007 02:33:02 GMT Re:i/o error 105 with WriteLn "Peter Below (TeamB)" <100113.1...@compuXXser
van GoogleInloggenVerborgen veldenZoeken naar groepen of berichten
this a result of Windows XP setting ? Is it fixable ?Les Maarten Wiltink 2011-05-16 07:23:21 UTC PermalinkRaw Message Post by Lessuddenly every time I use Writln function I get " io error 105"AssignFile(f, 'Id.Txt');Reset(f);WriteLn(f, 'Testing');CloseFile(f);Is this a result of Windows XP setting ? Is it fixable ?Multiposting is an ugly habit.(Answered in c.l.p.d.m.)Groetjes,Maarten Wiltink Jamie 2011-05-16 21:47:37 UTC PermalinkRaw Message Post by Lessuddenly every time I use Writln function I get " io error 105"AssignFile(f, 'Id.Txt');Reset(f);WriteLn(f, 'Testing');CloseFile(f);Is this a result of Windows XP setting ? Is it fixable ?LesIf you want to add to a file you need to use "Append(F)"if you want to restart a new file for writing, you need touse "rewrite(f)", which deletes any existing file of such name.Using Reset will assume a read function on a text file..Text file mode can only go one direction.Jamie 2 Replies 61 Views Switch to linear view Disable enhanced parsing Permalink to this page Thread Navigation Les 2011-05-16 04:48:30 UTC Maarten Wiltink 2011-05-16 07:23:21 UTC Jamie 2011-05-16 21:47:37 UTC about - legalese Loading...