• 0

The process cannot access the file


Question

Here is my VB.net 2010 code when a cell in a datagrid is clicked strPath being set to the full path of the file 

 

                Dim fs As New FileStream(strPath, FileMode.Create, FileAccess.Write
                k = UBound(myData)
                If k > 0 Then
                    fs.Write(myData, 0, k)
                    fs.Flush()
                    fs.Close()
                    fs.Dispose()
                    picImage.Load(strPath)
                    picImage.SizeMode = PictureBoxSizeMode.Zoom
                Else
                    fs.Close()
                    fs.Dispose()
                End If

 

The next time the code is accessed, ie  a cell in the datagrid is clicked I get a "The process cannot access the file" error

 

 

 

Link to comment
https://www.neowin.net/forum/topic/1383522-the-process-cannot-access-the-file/
Share on other sites

1 answer to this question

Recommended Posts

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • We must seek out very different subs on Reddit. I find excellent conversation around gardening, ranching, home DIY (although in decline sadly), technology, home automation ... But you carry on with your shitposting.
    • It didn't take that long, with the extension disabled (Cookie AutoDelete), without even leaving the browser, back on Neowin, and I'm greeted by this pop-up! So it's worse than with the extension enabled! Because before, at least during the same session, I could come back without having to close this pop-up! I'm going to do with it as if nothing was happening, and simply close the window. 🤷🏽‍♂️
    • "Can" is fine. I want the ability for it to "not." Actually, I would prefer vice versa. But it has to be optional, otherwise companies wouldn't be too happy.
    • ChatGPT can now connect to Outlook, Teams, Gmail, Google Drive, and other services by Pradeep Viswanathan Apart from regular consumers, ChatGPT is also growing fast among business users. In fact, OpenAI now has 3 million paying (Enterprise, Team, and Edu) business users, up from 2 million in February. During a live stream today targeted toward business users, OpenAI announced that ChatGPT can now connect to more external services to pull in real-time context and provide more useful responses for users. The following are some of the external connectors available in ChatGPT Deep Research for Plus, Pro, Team, Enterprise, and Edu users: Microsoft Outlook Microsoft Teams Microsoft SharePoint Dropbox Box Google Drive Gmail Liner In addition to the above, IT admins in organizations can now build custom ChatGPT connectors using the popular Model Context Protocol (MCP). These custom connectors will allow organizations to make use of the data available inside their proprietary systems and other apps within ChatGPT, alongside pre-built connectors. Today, the ChatGPT team also announced a new feature called record mode for ChatGPT Team users on macOS. The record mode feature will allow users to capture meeting audio and get meeting transcriptions, meeting action items, summaries, etc. ChatGPT record mode will also be available to Plus, Pro, Enterprise, and Edu users in the future. Kevin Weil, Chief Product Officer at OpenAI, tweeted the following regarding today’s launch: While ChatGPT's new connectors and features mark significant progress, it faces a formidable challenge in the enterprise market against Microsoft 365 Copilot, which enjoys native integration within the Microsoft 365 ecosystem.
  • Recent Achievements

    • Apprentice
      DarkShrunken went up a rank
      Apprentice
    • Dedicated
      CHUNWEI earned a badge
      Dedicated
    • Collaborator
      DarkShrunken earned a badge
      Collaborator
    • Rookie
      Pat-Garrett went up a rank
      Rookie
    • Week One Done
      Outdoor Saunaio earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      341
    2. 2
      snowy owl
      167
    3. 3
      +FloatingFatMan
      162
    4. 4
      ATLien_0
      161
    5. 5
      Xenon
      128
  • Tell a friend

    Love Neowin? Tell a friend!