2 Replies - 187 Views - Last Post: 23 January 2019 - 05:27 AM Rate Topic: -----

#1 astrid22   User is offline

  • D.I.C Regular

Reputation: 2
  • View blog
  • Posts: 288
  • Joined: 06-June 17

What causes the error: "Could not use "; file already in use&#

Posted 23 January 2019 - 02:45 AM

I created a simple project months ago using VS 2017. I tested it multiple times on multiple days and resolved all errors. However when my teammate put it through a stress test, he got an error saying "Could not use "; file already in use".

What normally causes it? Our database is Access only.
Is This A Good Question/Topic? 0
  • +

Replies To: What causes the error: "Could not use "; file already in use&#

#2 andrewsw   User is online

  • Stealth IT
  • member icon

Reputation: 6735
  • View blog
  • Posts: 27,711
  • Joined: 12-December 12

Re: What causes the error: "Could not use "; file already in use&#

Posted 23 January 2019 - 05:09 AM

I would suggest that you provide a lot more relevant information than you have provided.

However, a quick search of access error "could not use" obtained some useful results. (Did you perform such searches?)

You might need to delete the .ldb file; the database may be opened exclusively by someone.

If you need further assistance then, yes, you should provide more information. What are the exact error details? When do they appear, during the execution of what process or code? What kind of stress testing? Etc, etc..
Was This Post Helpful? 0
  • +
  • -

#3 Sheepings   User is offline

  • Senior Programmer
  • member icon

Reputation: 198
  • View blog
  • Posts: 1,113
  • Joined: 05-December 13

Re: What causes the error: "Could not use "; file already in use&#

Posted 23 January 2019 - 05:27 AM

Check your code first, you should be using using blocks on your connection/commands etc Doing so would dispose of open connections after use, which thus lead to a locked DB. Sounds like your DB is open and when that happens, it becomes locked. You will also experience the same error under the restriction of file permissions. The same way if a different user checks in on a file in your project, it can lock the file. Just making assumptions but with so little info, its hard to give a correct answer. Can you post some of the error info?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1