• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1167
  • Last Modified:

Unable to open the physical file "". Operating system error 32: "32(The process cannot access the file because it is being used by another process.

Please tell me why I am having this error? I have a SqlDataSource and I have set my connection string as well properly.. I am fairly new to ASP.NET so please give me suggestions on how to fix this...
0
kuntilanak
Asked:
kuntilanak
  • 4
  • 3
  • 2
  • +2
3 Solutions
 
VenkatgviCommented:
a. Open the VS Project for which you need to connect to a SQL database
2) Goto control panel> Admin tools> services
3) Look for SQL Server (SQLEXPRESS) service and Stop it and start it again
4) Try connecting your database now.
0
 
masterpassCommented:
The Error says it all .... The file you are trying to open is locked by some other process which is preventing the access ... Can you tell which file you are trying to access ?
0
 
masterpassCommented:
If you are using Visual Studio and if the connection to the local DB in Server Explorer is open, just close it and the page will be rendered.  After that Right click on the connection in Server Explorer, and chose "Close Connection"
I think that will solve the issue
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
Mike_MozhaevCommented:
Use Process Explorer utility from SysInternals suite to find out who holds the file.
Just press Ctrl+F, type part of filename and press Search

http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
0
 
kuntilanakAuthor Commented:
>>a. Open the VS Project for which you need to connect to a SQL database
>>2) Goto control panel> Admin tools> services
>>3) Look for SQL Server (SQLEXPRESS) service and Stop it and start it again
>>4) Try connecting your database now.

where is the control panel?

I tried to start and stop the SQLEXPRESS via SQL Server Config Manager however it still gives me the same result
0
 
masterpassCommented:
reposting  ...........

If you are using Visual Studio and if the connection to the local DB in Server Explorer is open, just close it and the page will be rendered.  After that Right click on the connection in Server Explorer, and chose "Close Connection"
I think that will solve the issue
0
 
kuntilanakAuthor Commented:
please clarify what you mean by the connection to the local DB in Server Explorer.. are you referring to the .mdf?
0
 
masterpassCommented:
Yes, The VS has a server explorer which will list the connection to the DB. The MDF file is what I am talking about
0
 
kuntilanakAuthor Commented:
well if I close the connection then it won't be able to pull out data from the server right
0
 
VenkatgviCommented:
control panel i meant is windows control panel

click the start button in windows - settings - control panel
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 4
  • 3
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now