How to open a text file that is already open?

Cem_KaraerCem_Karaer Member Posts: 281
Hello,

I want to open a text file read-only in Dynamics NAV 2009 R2 Classic client which is already opened by some other application.
File.OPEN(..)

command raises exception. Is there any other way to do this?
Cem Karaer @ Pargesoft
Dynamics NAV Developer since 2005

Comments

  • Big_DBig_D Member Posts: 207
    Hi Cem Karaer

    Is the file open cause it is still being written to?

    When importing a file we check the file size every no. of seconds to see if its changing - hence still be written to. If so then if say part of a Job Queue then try again later - say 30 mins!

    If the file is permanently open then I would say your out of luck as it is the operating system that is saying that the file is already open!

    Good luck
    Big D signing off!
  • Cem_KaraerCem_Karaer Member Posts: 281
    Big D wrote:
    Hi Cem Karaer

    Is the file open cause it is still being written to?

    When importing a file we check the file size every no. of seconds to see if its changing - hence still be written to. If so then if say part of a Job Queue then try again later - say 30 mins!

    If the file is permanently open then I would say your out of luck as it is the operating system that is saying that the file is already open!

    Good luck

    Hi Big D,

    Thank you for your interest. In fact the text file is to hold caller phone number information that is updated by the IVR system. Unfortunately it is permanently open by the IVR. It is possible for me to dictate the IVR side how to open the file. For example if the IVR system opens the file in share-mode and writes to it not closing, is it possible to read the file?
    Cem Karaer @ Pargesoft
    Dynamics NAV Developer since 2005
  • Big_DBig_D Member Posts: 207
    Hi Cem Karaer

    Thanks for the further information.

    Unless the IVR System can be encouraged to open, read/write and close the file periodically then my answer is you probably can't even read the file. Does the IVR System have any reporting tools - that could generate another means to accessing the required data?

    Good luck - sorry I couldn't of been of more help.
    Big D signing off!
Sign In or Register to comment.