When to open\close file

Hello, 
I have a loop with data acquisition and I would like to write this data to a file. 
What is the best option: to open the file once, at the beginning of the acquisition and to close it when it is done, to open it and close it every time I write a line on the file or to do something else?
If there is no best option, I would like to understand the good and bad points of each option.
Best regards, 
Gabriel
Solved!
Go to Solution.

Hi!
Hmmm...
The only right way to write into file or DB is the moment in time you should. Depending on the task under consideration, ofcoarse.
If the data you get each iteration is of no vital importance, then once a whole loop or even program is enough.
And, if each iteration's data is to be protected, I'd sertainly tried to find some system's time to open and close the file every single iteration - why not?
Talking about "better"? The only "better" is not to crash, suppose. 
Regards.

Similar Messages

  • Error message when I open Dreamweaver files

    Hi,
    I have troubled of Dreamweaver CS3 and hope some one can help
    me. When I open a file from one of my site which is connecting to
    database, I got error message that I have to close the Dreamweaver.
    It doesn't tell much what exactly wrong at the error message. These
    sites were working fine before. Any idea why this happen and how
    can I fix it?
    Thank in advance!
    Kenneth

    Not without a little more information. What server model are
    you using?
    What OS do you run? Can you provide connection code and
    recordset code?
    Lastly, what version of Dreamweaver did you create your pages
    in? If it was
    8, was it updated to 8.02?
    Nancy Gill
    Adobe Community Expert
    Author: Dreamweaver 8 e-book for the DMX Zone
    Co-Author: Dreamweaver MX: Instant Troubleshooter (August,
    2003)
    Technical Editor: Dreamweaver CS3: The Missing Manual,
    DMX 2004: The Complete Reference, DMX 2004: A Beginner's
    Guide
    Mastering Macromedia Contribute
    Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP
    Web Development
    "takcw" <[email protected]> wrote in message
    news:fj5um4$l7g$[email protected]..
    > Hi,
    >
    > I have troubled of Dreamweaver CS3 and hope some one can
    help me. When I
    > open
    > a file from one of my site which is connecting to
    database, I got error
    > message
    > that I have to close the Dreamweaver. It doesn't tell
    much what exactly
    > wrong
    > at the error message. These sites were working fine
    before. Any idea why
    > this
    > happen and how can I fix it?
    >
    > Thank in advance!
    > Kenneth
    >
    >
    >

  • When i open a file the pictures show at bottom, but when I click on a pic it only shows a triangle with a ! in the center

    when i open some files the pictures show at bottom, but when I click on a pic to open it only shows a triangle with a ! in the center

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.  
    Regards
    TD

  • When i open psd files Photoshop CC 2014 stops working

    When i open psd files photoshop stops working and then i have to close program
    Pls can anyone help me im geting crazy trying to figure out what to do.

    PS SYSTEM Info would help us as would your PS crash reports.
    Supply pertinent information for quicker answers
    The more information you supply about your situation, the better equipped other community members will be to answer. Consider including the following in your question:
    Adobe product and version number
    Operating system and version number
    The full text of any error message(s)
    What you were doing when the problem occurred
    Screenshots of the problem
    Computer hardware, such as CPU; GPU; amount of RAM; etc.

  • RE: [Adobe Reader] when i open pdf file it open all the pages but some pages give error massage (there was error processing a page,there was a problem reading this document 110) but if i open this page which give me error with google chrome it's work ? i

    HelloThank's for your helpsI hope this document is helpfulBest Regards,
    Date: Sun, 22 Jun 2014 17:10:17 -0700
    From: [email protected]
    To: [email protected]
    Subject:  when i open pdf file it open all the pages but some pages give error massage (there was error processing a page,there was a problem reading this document 110) but if i open this page which give me error with google chrome it's work ? if you can help me th
        when i open pdf file it open all the pages but some pages give error massage (there was error processing a page,there was a problem reading this document 110) but if i open this page which give me error with google chrome it's work ? if you can help m
        created by Anoop9178 in Adobe Reader - View the full discussion
    Hi,
    Would it be possible for you to share the document?
    Regards,
    Anoop
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6485431#6485431
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
         To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Adobe Reader by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

    thank's for reply and your help
    i did the step's that you told me but  i still have the same problem
                                     i have the latest v.11.0.7
    i
    i disable the protected mode

  • Since the installation of Firefox 8, I cannot download a specific file type from email. I use this for work and MUST be able to open these files with a specific software. When FF opens the file, it changes the extension and it will not open. Help!!!

    I use the Microsoft Outlook Web App for work email. I receive files with a .RXML extension. This has always worked just fine until the latest version of Firefox came out (I was using FF 7 until this weekend). Now FF changes the extension to .ashx when I open the file and I cannot download it into my software. If I go to the company internet site and download directly from there, it does the same thing. But I can open these files just fine from IE. I REALLY don't want to have to go back to IE.

    I opened one of the PDF files in notepad and these are the first couple lines:
    瀖ᕁމጿ␠씴豈䧉筩롈ꓳ劏ꎯ僪뚢頟뻏즏谀㿃夑퀉꟠鲲쮂⫉笿褡밤籞冁탁ӓ轸뿐笼ⵆ횰䄌ඁ淥ة寨闤⬅鳦팥링빨嬄敎უ婏㣴ً鮓ࣿꢚ㑀녲莒඼ိȆ䕇纍쉉籶뺝갞伐쮠᥏﯒넉釖ȓ겴☧ ἣ秵駻�䣞띰㖔流羀籔朼敨ꢉ糶당⬤俉膇䄐惡�ಹꛖ鍡恡ⱶᶜ�堷﹑ﱌ僿걄뎔æ䋷귪⛢⫐䅪䉙὿烶ꖆ႟ᗔ瘞狻틫儩六잶覱낵듘盋崾�ᦜ㺆௹뻹燴ឋ騙쬄ꏿ뽒煹�钼뇲腎稦ꃲ㈃沒ꔈ뺐뛽첑䘶畱䍣紻 ⁜哠鳾

  • When i open pdf file it open all the pages but some pages give error massage (there was error processing a page,there was a problem reading this document 110) but if i open this page which give me error with google chrome it's work ? if you can help me th

    when i open pdf file it open all the pages but some pages give error massage (there was error processing a page,there was a problem reading this document 110) but if i open this page which give me error with google chrome it's work ?
    if you can help me thank's
    [email address removed by host]

    thank's for reply and your help
    i did the step's that you told me but  i still have the same problem
                                     i have the latest v.11.0.7
    i
    i disable the protected mode

  • I have a new Sony alpha 77ii.  My PS version is 5.0.  When I open the files in Bridge, they are .ARW files.  How do I convert them to JPEG's so I can view and edit them?

    I have a new  Sony alpha 77ii.  My PS version is 5.0.  When I open the files with Bridge they are .ARW files.  How do I convert them to JPEG's or something I can view and edit?

    You can use Adobe's free DNG converter to convert proprietary raws to the universal DNG raw format. Here are the links:
    Adobe - Adobe Camera Raw and DNG Converter : For Windows : Adobe DNG Converter 9.0
    Adobe - Adobe Camera Raw and DNG Converter : For Macintosh : Adobe DNG Converter 9.0
    Converting to JPEG will be an extra step afterwards.
    Benjamin

  • When I open InDesign files from our design team, the fonts don't show up even though I have them installed on my computer. How do I get it to recognize fonts I have installed?

    I use my Adobe programs from the Creative Cloud. When our design agency sends me files, I open them and fonts I have on my computer aren't showing up when I open the file. Everywhere online it says I need to add the fonts to InDesign's font file, but since I'm working out of the Creative Cloud, I don't have that option. How do I get InDesign to recognize these fonts when I'm opening files from our agency?

    ID sees fonts installed on your computer and contained in a Document Fonts folder in the same folder as the document, if one exists.
    I don't really understand what you are saying about fonts you have installed not showing up. And cloud makes no difference -- all the applications and support files are installed on your hard drive.

  • Does any one know what the matrix.dms is? And why it is in my picture folder? When I open this file the unarchiver takes over and I see my entire hard drive when I scroll down I see the matrix.dms file with in the unarchiver.

    Hello everyone. Does anyone know that the matrix.dms file is? And why it may have came to be in my picture folder? When I opened the file the unarchiver took over, then I saw my files in the unarchiver window. I then scrolled down and I saw the same matrix.dms file within the unarchiver window. I made a video of what saw when I tried to open the file, so as to aide in your understanding of reason for my perplexion at this file. Thank you for your help. https://www.youtube.com/watch?v=2QeWH9hRnro&feature=youtu.be

    Hi EMT-B,
    It sounds like you have done all the troubleshooting needed to narrow down your issue with the iPhone camera to hardware. Based on the information you have provided, it appears your iPhone needs to be serviced. The following link should help you get started with the process and has links with additional information on topics such as warranty and service pricing, battery replacement, and express replacement service.
    Apple - Support - Service Answer Center
    http://support.apple.com/kb/index?page=servicefaq&geo=United_States&product=ipho ne
    You may need to change the country when you get to the page.
    Thanks for using Apple Support Communities.
    Best,
    Brett L

  • When I set all the tracks in the latest Garageband to the same volume levels and save, when I open the file again they've changed back to a previous setting?

    I'm trying to mix a recording in the latest 2014 version of Garageband, but when I set all the tracks in the latest Garageband to the same volume levels and save, when I open the file again they've changed back to a previous setting? Does anyone know why it changes even after saving the file?
    Below is my iMac settings.

    Do you have a back up?
    If not you're into using file recovery software like  File Salvage - you can download a free trial and it will scan the disk for you and tell you with might be recoverable. Actual recovery will require that you purchase the app. There may be many files with the same or similar names. Always recover the largest file size.
    There are other such apps. Search on Macupdate or the App Store

  • Photoshop locks when I open a file

    I have CS5 and CS6.  I had downloaded FontExplorer X but subsequently uninstalled it because I was not using it.  Then the problems started... if I missed the little dialogue box that would pop up when I opened a file, PS would be locked.  So I went to my plugin folder and deleted the folder for FontExplorer X all together.  Now I can't even get a file to open in PS; it just locks and I can't do anything but end task from my task manager.
    I am running Windows 7 on a PC.  How can I get this plugin gone once and for all?  I tried to go to Edit>Preferences>Plugins but without opening a file (which locks PS) I can't get to that menu choice.
    Please help.    

    You may have to simply uninstall Photoshop altogether, then delete the remaining application folder as it may contain support files for FontExplorer. Then reinstall and try again.

  • Hello, I have a Mac computer with NVIDIA 750M dedicated graphics card and monitor EIZO but the problem was there when I was working with Windows and Acer monitor. When I open a file from Camera Raw in PS this is smaller than the screen so I double-click w

    Hello, I have a Mac computer with NVIDIA 750M dedicated graphics card and monitor EIZO but the problem was there when I was working with Windows and Acer monitor. When I open a file from Camera Raw in PS this is smaller than the screen so I double-click with the tool "hand" to fit on the screen, but the picture loses sharpness and becomes blurry. If you magnify the image even only slightly with the tool "zoom" the picture comes back clear. In Camera Raw instead is always sharp. I solve the problem by turning off the graphics card in PS but often use plugin that need the graphics card otherwise the processing time is much longer. I ask for help.
    Thanks.

    Hello, I have a Mac computer with NVIDIA 750M dedicated graphics card and monitor EIZO but the problem was there when I was working with Windows and Acer monitor. When I open a file from Camera Raw in PS this is smaller than the screen so I double-click with the tool "hand" to fit on the screen, but the picture loses sharpness and becomes blurry. If you magnify the image even only slightly with the tool "zoom" the picture comes back clear. In Camera Raw instead is always sharp. I solve the problem by turning off the graphics card in PS but often use plugin that need the graphics card otherwise the processing time is much longer. I ask for help.
    Thanks.

  • MAC OS Yosemite - CS6 - A while back, i did something to where when i open a file in photoshop, it no longer is one window, now it's two separete ones. one for the program itself, and another for the actual file how do it get it back to where it's all one

    - A while back, i did something to where when i open a file in photoshop, it no longer is one window, now it's two separete ones. one for the program itself, and another for the actual file how do it get it back to where it's all one window without having to be in full screen mode? I've managed to go some time like this, but right now it's just really annoying me. HELP!!!

    Just drag the small window to the top right below the toolbar, you'll see the area highlighted and when you drop it the file should dock.

  • When I open a file in Photoshop CS4, how can I resize My Open Window File?it is stuck on full screen

    When I Open a File in Photoshop CS4, How can I Resize My Open Window File? It is stuck on Full Screen?

    Which operating system are you using?
    On a windows os, usually one can just double click on the title bar in the open dialog.

Maybe you are looking for

  • FM for microseconds to  hours : minutes : seconds : microseconds conversion

    Hi Expart ,                 Is there is any Fm to Convert  microseconds to  hours : minutes : seconds : microseconds. Actually i get the runtime in Micro second and i need to display it in above format . Please help me to get the fm or other simple w

  • Got invited but app says my account not activated

    Hello, i got email with subject line Great news - Skype Translator is ready for you but when downloaded and started skype translator it give me error saying "thanks for your interest in skype translator, the preview is available by invitation only. t

  • How to show the message text for constraint violations

    Hi all, In a batch procedure a primary key is violated (ORA-00001). For the primary key, a message is recorded in the TAPI and the message table. How to show the enduser a proper message text instead of the ORA-00001. We are using Designer 6 with Hea

  • Problema stampante messaggio 'filter' non riuscito

    Ho una stampante HP collegata in rete locale tramite ethernet. Fino a ieri non mi ha dato alcun problema. Da ieri, invece, non completa le stampe e lo spooler mi segnala, come messaggio "filter non riuscito". Peraltro, occasionalmente invece stampa.

  • Lenovo z510 automatic repair

    Hi I have Lenovo Z510 everytime when I restart my Lenovo I goes to automatic repair tool n then windows didn't boot and then I restart it n go to recovery process n use initial recovery when the process completed and process Need to restart I restart