Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


The process cannot access the file "EVSET2BC7601F642B1175BD6C0A956232F5CF.xml" because it is being used by another process.

Posted on 2006-07-08
Medium Priority
Last Modified: 2012-06-27
I'm getting this exception thrown when I run one of my threads.

EXCEPTION GETEPP: The process cannot access the file "C:\EVENTSETTINGS\EVSET2BC7601F642B1175BD6C0A956232F5CF.xml" because it is being used by another process.

How would i implement a stream to write the xml, if thats the solution.

Here is the code where the problem occurs,

            Dim TEMPPATH As String = "C:\EVENTSETTINGS\EVSET" & EVI & ".xml"

            Dim CompleteTable As New DataSet
            Dim TBLCOPY As New DataTable

            TBLCOPY = TBL.Copy



            Catch ex As Exception
                Do While Not ex.Message.ToString = ""
                    Debug.Write("EXCEPTION GETEPP: " & ex.Message.ToString & vbNewLine)
            End Try

            Debug.Write(vbNewLine & "WRITING FILE: " & TEMPPATH & " TABLE COUNT: " & CompleteTable.Tables.Count & vbNewLine)

            strTag = ""

            MainForm.FieldParseControls(TEMPPATH, MainEventFormURL)

500 Points because this is urgent! :D

Question by:JPERKS1985
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
LVL 37

Accepted Solution

gregoryyoung earned 2000 total points
ID: 17067177
Are there other threads/processes accessing this file?

This is just telling you that something else has it opened exclusively.

perhaps you are missing a clsoe or dispose somewhere else?

Author Comment

ID: 17069425
I fixed it by removing a thread that was writing to it. I have more code that has the same issue though. any suggestions?

        Dim DSet As New DataSet
        Dim Dtbl As New DataTable
        Dim flXML As String

        flXML = (TabControl1.SelectedTab.Tag)


        Do While DSet.Tables.Count = 0

        Dim cName As ComboBox = CType(sender, System.Windows.Forms.ComboBox)
        cName.Name = CType(sender, System.Windows.Forms.ComboBox).Name

        Dim DRow As DataRow
        Dim EventFileName As String

        For Each DRow In DSet.Tables(0).Rows
            If IsDBNull(DRow.Item("VALUE")) Then
                DRow.Item("VALUE") = "NULL"
            End If

        For Each DRow In DSet.Tables(0).Rows

            If DRow.Item("VALUE") = cName.Name Then
                DRow.Item(8) = cName.Text
                TMEventInfoParseGrid.DataSource = DSet
            End If


Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

661 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