Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Express Edition and Compact Edition (2005)
 Unable to open the physical file. Operating error

Author  Topic 

alfmarmarin
Starting Member

1 Post

Posted - 2006-05-09 : 23:26:49
Hi.. !!

I am working in a C# database application quick test where I basically use two types of access to an SQL Server Express database.
In the first part of the code, I use the traditional connection declaring a SqlConnection. When I just use only this kind of connection I do not have any problem. The issue starts when I access to the same database using Data Bindigs at the same time. When I start the application I got and error as soon as the instruction goes to open the data base connection.
The reported error is "Unable to open the physical file "<Niños.mdf>". Operating System Error 32: (Process does not have access to the file because is being using by another process)"

For additional information my connection string is:

"Data Source = localhost\\SQLExpress; Initial Catalog = Niños; Integrated Security = True; User Instance = false"

Does anyone have any idea on how to solve this problem?

Thanks
Alfredo.

Spionred
Starting Member

8 Posts

Posted - 2007-01-22 : 16:43:18
Can anyone help this guy cos I am having the same problem.

I have a VB.NET in VS2005 project that also used the SQLConenction method. My issue was I changed my project and created a Data Connection so I could try and deploy the database with the app in one go. However when I did this the whole thing crapped out. The only way I can get the app to connect is to change the connection string I was using in the SQLConenction to match the one the new Data Source in VS is using or change my code to use the data binding. What is worse is now I can't access the database using any of my other tools (SQL Management that comes with SQL Express or TOAD for SQL)

Any ideas on how to change it back?
Go to Top of Page
   

- Advertisement -