Saturday, February 25, 2012

connecting SQLExpress & Visual C# 2005

Hi

I have started to create a databse using SQL Server Management Studio Express, just a few tables, one with data. I now want to creat a some windows forms to populate the tables. However when I try to use the Add New Data Source wizard, I get an error when I try to create the connection string, but I have managed to connect to a copy of AdventureWorks located in the same parent directory.

Error is :
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.)".
An attemp to attach an auto-named database for file ... failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

As I can connect to AdventureWorks, I presume Windows thinks the file is open, but I have no idea why, how to check, or how to close it.

TIA

Graham

Now Sorted not quite sure what I did, but I have downloaded some updates today, and I did start by looking at the data in Adveture works before I opened my project

No comments:

Post a Comment