Io Error 104
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Why is my code causing a I/O 104 error? up vote 1 down vote favorite This program raises an I/O 104 error on EoF when first entering the while loop. The purpose of the program is to look up if a username is already taken. The existing usernames are stored in a text file. procedure TForm1.btnRegisterClick(Sender: TObject); begin sCUser := edtUserName.Text; AssignFile(tNames, 'Names.txt'); begin try Reset(tNames); except ShowMessage('File not found'); Exit; end; end; rewrite(tNames); while not EoF(tNames) do // I get a I/O 104 Error here ` begin Readln(tNames, sLine); iPosComme := Pos(',', sLine); sUser := Copy(sLine, 1, iPosComme - 1); Delete(sLine, 1, iPosComme - 1); if sCUser = sUser then begin ShowMessage('Username taken'); end else begin rewrite(tNames); Writeln(tNames, sCUser + ',' + '0'); CloseFile(tNames); end; end; end; delphi delphi-7 share|improve this question edited Oct 14 '13 at 16:21 Jens Mühlenhoff 8,31832372 asked Oct 12 '13 at 14:15 Dévan Steyn 612 You should use TIniFile. –Little Helper Oct 12 '13 at 14:34 1 @Roberts: INI file does not solves the problem at all. –Kromster Oct 12 '13 at 17:34 @Krom Stern I didn't say that it's going to solve the problem =P –Little Helper Oct 12 '13 at 18:04 2 @Roberts: Would be good to hear your reasoning still, why not xml or sql db for example ;-) –Kromster Oct 12 '13 at 18:20 add a comment| 3 Answers 3 active oldest votes up vote 6 down vote Remove the call to Rewrite()before Eof(). Even if you were not getting an IO error, your code would still fail because Rewrite() closes the file you opened with Reset() and then it creates a new bank file, so Eof() would always be True. Update: error 104 is file not open for input, which means Reset() is not opening the file but is not raising an exception (which sounds
has me baffled and I can't find out what a 104 error is in the first place. Here is the source: SetCurrentDirectory(PChar('C:\Batchadd\InPut\Moved')); //switch to input directory FindFirst(PChar('FUSM*.*'), faAnyFile, FindFileData); // find moved files AssignFile(TempFile, FindFileData.Name); // assign as text file Reset(TempFile); //open textfile as read only While NOT EOF(TempFile) Do ----> This is where the crash occurs after having gone through once. Begin Thanks a lot! Hajo Markku http://stackoverflow.com/questions/19335153/why-is-my-code-causing-a-i-o-104-error Nevalaine Delphi Developer Wed, 18 Jun 1902 08:00:00 GMT Re:I/O error 104 while parsing text file Is your I/O error checking turned off? Try turning it on, if it would have any effects. The actual I/O error can be some lines earlier than the de{*word*81} reports it. Markku Nevalainen QuoteJavaHead Jones wrote: > I'm getting a '104' I/O error while parsing a text file. This one has me > baffled and http://www.delphigroups.info/2/43/45318.html I can't find out what a 104 error is in the first place. > Here is the source: > SetCurrentDirectory(PChar('C:\Batchadd\InPut\Moved')); //switch to > input directory > FindFirst(PChar('FUSM*.*'), faAnyFile, FindFileData); // find moved > files > AssignFile(TempFile, FindFileData.Name); // assign as text file > Reset(TempFile); //open textfile as read only > While NOT EOF(TempFile) Do ----> This is where the crash occurs > after having gone through once. > Begin > Thanks a lot! > Hajo Ray Crame Delphi Developer Wed, 18 Jun 1902 08:00:00 GMT Re:I/O error 104 while parsing text file QuoteJavaHead Jones wrote: > I'm getting a '104' I/O error while parsing a text file. This one has me > baffled and I can't find out what a 104 error is in the first place. File not open for input. Quote> Here is the source: > SetCurrentDirectory(PChar('C:\Batchadd\InPut\Moved')); //switch to > input directory > FindFirst(PChar('FUSM*.*'), faAnyFile, FindFileData); // find moved > files > AssignFile(TempFile, FindFileData.Name); // assign as text file > Reset(TempFile); //open textfile as read only > While NOT E
Common F23 Bugs Common F24 Bugs Communicate with Fedora The Documents Bug Reports Fedora Update System (Bodhi) Fedora Build System (Koji) Official Spins FedoraForum.org > Fedora 23/24 http://forums.fedoraforum.org/showthread.php?t=83813 > Using Fedora fatal IO error 104 (connection reset by peer) on X server FedoraForum Search User Name Remember Me? Password Forgot Password? Join Us! Register All Albums FAQ Today's Posts http://damnsmalllinux.org/static/act-Print/f-8/t-14815.html Search Using Fedora General support for current versions. Ask questions about Fedora that do not belong in any other forum. Google™ Search FedoraForum Search Red Hat Bugzilla Search Search Forums io error Show Threads Show Posts Tag Search Advanced Search Go to Page... Page 1 of 2 1 2 > Thread Tools Search this Thread Display Modes #1 3rd November 2005, 08:13 PM mlf Offline Registered User Join Date: Nov 2005 Posts: 13 fatal IO error 104 (connection reset by peer) on X server Hi, I get this error after loging io error 104 in as root and typing startx to begin linux, I found many articles that state it is a driver issue and say the Xorg.conf file should be edited in the display and video card sections. but /etc/X11/Xorg.conf doesn't open and says 'access denied' and I have no clue what to edit in this file?! Do you know how do I enable my FC4 GUI and begin using Linux? mlf View Public Profile Find all posts by mlf #2 3rd November 2005, 08:33 PM b_martinez Offline Registered User Join Date: Apr 2005 Location: Pueblo,Colorado Posts: 724 Are you booting into a command line environment? Or trying to boot into GUI and ending up in command line? What card are you using? Can you get the specs ofyour monitor off the I.D.plate? Will you post them? Do you know how to use vim? Lotsa Questions, but the info is necessary to try to fix your problem. Bill Last edited by b_martinez; 3rd November 2005 at 08:36 PM. Reason: info b_martinez View Public Profile Find all posts by b_martinez #3 3rd November 2005, 08:45 PM mlf Offline Register
liveCD and a HD install with a swap partition. the message is modprobe: can't locate module fb0XIO: fatal IO error 104 I've been doing some searching and realize its related to some video config thing... what i should i do next ?the toshiba satellite cdt4000 is a pretty old laptop, running with P2-233 Mhz, and 32 MB RAM.i'm quite a green noob, just cutting my teeth in the linux world, so I'd really appreciate any guidance! Posted by Ikram on Aug. 24 2006,14:07 Hello Posted by ^thehatsrule^ on Aug. 24 2006,23:43 Did you use md5sum to verify your download. -Is your boot media corrupt?What happens when you change around using xsetup? failsafe? see the wiki for more boot/cheat codes.Did you get any errors before this? And when does it occur? Can you still use DSL after this error? Posted by OJCIT on Sep. 21 2006,00:38 I can't help, but I can sympathize, since I get the same error depending on how I do it.I don't think it's an md5 sum problem, since I can get around by doing xsetup and selecting a semi-legitimate option. I'm gonna try the manual dpi override... Posted by Ikram on Sep. 24 2006,09:13 my download is ok..not an md5 sum problem, the DSL live CD works perfectly on another laptop (a newer one)tried xsetup, this is what i got after choosing the options-sed: /opt/bootlocal.sh : no such file or directory Posted by satellite on Sep. 30 2006,06:34 helloI have the same problem like Ikram on my old Toshiba satellite 110cs. I have a Frugal instalation on hda1 and a hd instal on hda 2 with Grub.When i boot with xvesa the colours are al wrong on the screen. When I try to boot with fb800x600 I get the same error mesage fatal IO error 104.Help! Posted by ^thehatsrule^ on Sep. 30 2006,22:02 Try other video modes in the F2/F3 menu,or for X, you can try changing the server and video modes by running xsetup.sh Powered by Ikonboard 3.1.2a Ikonboard © 2001 Jarvis Entertainment Group, Inc.