[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

I/O Error 183

Posted on 1998-04-02
3
Medium Priority
?
4,829 Views
Last Modified: 2011-10-03
just started geting i/o error 183 to a program that has been working for years!. Using delphi 2.0 and DBF files; trying to perform a rewrite following and AssignFile to a textfile var on a unique filename. The file name has a full path defined to a directory that does exists on a drive that does exist. This occurs on the local drive (non-networked) on either a windows nt client or a windows 95 client. I can't find any docs on this......
0
Comment
Question by:asleszynski
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
williams2 earned 200 total points
ID: 1361252
I have experienced your problem before. I solved it by setting the generel FileMode variable like this:

Procedure WriteFile(FileName: String);
var
  F: File of text;
Begin
  AssignFile(F,FileName);

//Valid FileMode values are:
//0      Read only
//1      Write only
//2      Read/Write

  FileMode:= 2;
  Reset(F);
  Write(F,'Hello World');
  CloseFile(F);
End;

The big problem is, that Delphi got severel levels of filehandling, and mixing them, can make influence to previous written and (almost) perfect working code. :-)

Regards
Williams
0
 

Author Comment

by:asleszynski
ID: 1361253
i/o error 183 really is "Directory already exists". Prior in my code I issued a {$I-} followed by a series of MkDir commands containing paths that Already exist. Since I forgot to perform IOResult following the MKDir, the error propageted into the next i/o call; or ReWrite. I/O Error 183 was actually occuring on the MkDir function call. A call to IOResult would have cleared it.....thanks to all.... alan
0
 
LVL 3

Expert Comment

by:williams2
ID: 1361254
You paid a big for that one then, hope you can make use of my hints then selsewhere.

I didn't know that Error, I haven't had the problem before, but instead of using the {$I-} directive,  use the Try-Except block instead. You may be able to write more user.friendly code then.

Regards
Williams
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question