Re: File Already Open error

From: Keld Laursen [eMVP] (kl_at_unnededideelektronik.dk)
Date: 08/26/04

  • Next message: Keld Laursen [eMVP]: "Re: How-to: Scrolling Text Window"
    Date: Thu, 26 Aug 2004 11:08:56 +0200
    
    

    If you know what program is the culprit, then you should be able to
    terminate it "remotely".
    I would advice against it, though.

    A better solution (IMO) is to catch the fact and present the user with the
    info.
    Even if the user doesn't have any other option than go to "settings" and
    kill the program - or open another document instead.

    If you had the option of writing to the file even when told not to, all
    sorts of bad things could happen, so be glad that you can't.

    /Keld Laursen

    "JamesL" <forgeddaboudit@spamblock.duh> wrote in message
    news:Z1cXc.603$W_5.424@newsread1.news.pas.earthlink.net...
    > I have a program I wrote that occasionally gets the error File Already
    Open
    > when trying to write to a file.
    >
    > I have determined that the user has opened the file in another program
    such
    > as Pocket Word and exited, but handheld working the way they do, did not
    > really exit but instead threw the program to the background. So the file
    > relay is open in another program.
    >
    > Is there a way to check for the file being open in another program and
    force
    > it to close, or ignore the fact and write to it anyway?
    >
    > James Lysaght
    >
    >


  • Next message: Keld Laursen [eMVP]: "Re: How-to: Scrolling Text Window"

    Relevant Pages

    • Re: calcuim bentonite
      ... I'll repeat: ... Since we know very little about people coming in here, it is best, imo, ... to hold firm to the advice given by the experts at AKCA/KOI USA and those ...
      (rec.ponds)
    • Re: Dog Obedience classes in Baltimore County schools
      ... and instuctor, IMO your time would be far better spent in turning off your ... That would mean CALLING the instructor, HONESTLY describing the issues you ... but it's good advice nonetheless. ...
      (rec.pets.dogs.behavior)
    • Re: I really need Help??
      ... > evaluate the advice and whether to proceed on it or not? ... IMO. ... personal attacks on someone -- who *may* be ... "harm" (and I put "harm" in quotes because we're ...
      (microsoft.public.windowsxp.moviemaker)
    • Re: Some Advice.
      ... imo Bob's advice is always worth listening to. ... IMO it's *always* important, regardless of language. ... Source code is primarily for human consumption. ... Practice, practice. ...
      (alt.comp.lang.learn.c-cpp)
    • Re: NTVDM CPU has encountered an illegal instruction
      ... > The NTVDM has encountered an illegal instruction. ... > terminate the application. ... > Kindly advice on how I could fix this. ...
      (microsoft.public.win2000.cmdprompt.admin)