"connections to SQL server files (*.mdf)" error message in Visual studio when adding a new SQL database

Hope you can help.

Running Visual Studio 2005 and SQLServer2005.  I have created a new project and am attempting to add a new SQL database to it.  When I select the SQL database I get an "Connections to SQL server files (*.mdf) requires SQL Server Express to function properly" error message.  I also tried to add an existng database and it errors out as well "The file can not be opened as it is being used by another process.....". 

However, I can create a new data source connection to existing SQL databases.  One caveat though.  I can retreive data from the tables but any changes are reflected in the application but not in the database itself.  (not writig changes to the database)

 I am assuming both problems are connected but am at a loss to explain it.  I have checked the VisualStudio machine.config file and tried several modifications to the server connect string, all with the same results as above.

 I have also looked at the "/tools/options/database tools/data connections" dialog and enterd both the name of the server as well as left it blank without success.



3/24/2009 5:29:21 PM
asp.net.visual-studio-2005 7760 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 39


Express database can only be attached by one instance. If you want to open it, you have to detach it from the instance.

In this case, please make sure the database that your ASP.NET application is connecting is the same one with you are checking.

For more information, see Using SQL Server Express Edition with ASP.NET (http://msdn.microsoft.com/en-us/library/ms247257.aspx). 


I look forward to receiving your test results.

Thomas Sun
Microsoft Online Community Support

Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
3/27/2009 7:05:38 AM

Similar Artilces:

Visual Studio "Orcas" Visual Studio.net "2005"
What are Microsoft on weed??? Whidby Orcas Indigo XAML Longhorn What are they trying to do to us developers. The transition to any new tools should be minimal. What we know about WebServices is now old bunk. Why did we bother with .net 1.1???????? Now we need to learn new silly names and new ways of doing things. Yes .net 1.1 is still supported in v2.0. But there are a million and one other needless things that we will have pushed onto us. Only to find in anther two years that they are old hat and there are new radical ways to do what we want.MCAD.Net vb.n...

Visual Studio 2005. "Quick Find", "Quick Replace", "Find in Files", "Replace in Files" functionality no longer works
Hello, I just run into problem that find functionality is no longer working in Visual Studio 2005. "Quick Find", "Quick Replace", "Find in Files", "Replace in Files" functionality no longer responds. These are necessary functions when build any website. Any solutions on how to fix this problem?Improving lifestyles for luxury pets: TheFabulousPet In Menu bar click Window -> Reset Window Layout. It solves the problem.Improving lifestyles for luxury pets: TheFabulousPet...

SQL Server Reporting Services for SQL SERVER 2000 AND Visual Studio.NET 2005 .NET 2.0
Hi, Which version of SQl Server Reporting Services will work with SQL SERVER 2000 in pararrel with ASP.NET 2.0 (.NET 2.0 framework)?  Thanks, Azam HighOnCodingWanna get high! Hi, Okay I got the answer. Yes, we can use the SQL SERVER 2005 Reporting Services with SQL SERVER 2000. HighOnCodingWanna get high! ...

Error message "Unable to connect to Visual Studio's Localhost Web Server"
Hi, Iam using VS 2005. Whenever i run asp.net web site from within my project by pressing following error occurs as pop up window. "Unable to connect to Visual Studio's Localhost Web Server". I can build my web site and access this via opening new browser and typing path but not via pressing F5 within VS studio environment. Any ideas?   Regards, Rahul Check out this thread.Darrell Norton, MVPDarrell Norton's BlogPlease mark this post as answered if it helped you!...

In Visual Studio 2005 whats difference between "new Project" and "new website".
In Visual Studio 2005 whats difference between "new Project" and "new website".  Is new project for non web realted stuff.   Hi Parms,New Project enables you to add projects to your solution for non-web related projects -- for example: windows applications, class libraries, etc.  New Website adds a project specific to web UI developmnet.Hope this helps,Scott Hi Scott --On a related subject: I've got a VS 2003 solution with three web apps. The third web app is really just a library of classes that are shared between the other two web apps.app_1: a real web app (references ...

Difference between "Visual Studio 2005 Professional" and "Visual Web Developer 2005 Express Edition"
I would like to build a web application for my department.  But I found that both tools can be used to build a ASP web site.  What is the difference between these two tools ?  Do they function the same ?  You can review this online features matrix between all visual studio versionshttp://msdn2.microsoft.com/en-us/vstudio/aa700921.aspx  Hosam Kamel Remember to click on Mark as answer on the post that helped you Have a look here http://blogs.msdn.com/mikhailarkhipov/archive/2006/06/26/647516.aspx. Thanks----------------------------------------------------------...

Error found "Access to the path "C:\Program Files\Microsoft Visual Studio .NET\Crystal Reports\Viewers" is denied. "
Hi guys! i'm trying to solve the error "Err Msg: "Object reference not set to an instance of an object" in ASP.NET app" but when i followed the instructions in the http://community.crystaldecisions.com/library/kbase/articles/c2011144.asp link, this error appeared ""Access to the path "C:\Program Files\Microsoft Visual Studio .NET\Crystal Reports\Viewers" is denied. " What's going on? i already went to the iis to add new virtual directory (CrystalReportWebFormViewer) but different error appeared when i compile and browse my application. pls help ...

SQL Server 2005 express connectivity with Visual Studio.NET 2005
Hello I'm having a problem with the server connection and my C# code. The code executes alright but no data is entered into the database behind it.  I'm pasting the connection code over here as well. The sql commands are used in the code. I think I used the sql server mobile edition which is installed along with visual studio.net 2005. Anyone know what's wrong, and can help me out? Thanks in advance.public static void storeInDb(string trackName, string artist, string albumTitle, string year, string path, uint[] fp) { string connStr="Data Source=.\\SQLEXPRESS;At...

I cannot stop Visual Studio.NET 2005 from looking for SQL Server 2005 instead of SQL 2000
I would like to know how to set SQL2000 as the default database server when running any webapplication. I have installed Visual Studio.NET and SQL Server 2000 locally in my laptop.  But anytime I want to run a webapplication I am getting the following error:System.Data.SqlClient.SqlException was unhandled by user code  Class=20  ErrorCode=-2146232060  LineNumber=0  Message="An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server doe...

error message: "Visual Studio .NET cannot create the application <application>. The likeliest problem is that required components are not installed on the local Web server."
after enabling ssl using iis certificate services, creating and installing server and client certificates; i encountered this message when i try to reopen the project in vs 2003. how to work with ssl web apps in vs.net. please reply asap......

i am getting problem when i am connecting to database sql server 2005 from visual studio 2005
 the error is "An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"mine is a windows authentication server.  Hi v_badhra,see this article:http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277 Samu ZhangMicrosoft Online Community SupportPlease remember to click “Mark as Answer” on the pos...

Visual Studio 2005, SQL Server 2005 Database, aspnetdb
I have just created the ASPNETDB database with the aspnet_regsql.exe utility in the Windows\Microsoft.net\Framework\v2.0.50727. I can see the database in SQL Server Management Studio. The database itself has a user XXXXXX\ASPNET. It has "CONNECT SQL" and "VIEW ANY DATABASE" Effective permissions. When I add permissions to the ASPNETDB, I am have 13 ASPNET Database Role objects that can be added to the permission list. Can anyone give me guidance as to what permissions need to be granted to what Database Role / User? Presently the Web Site Administration Tool is unable to...

Upgrading from "Visual Web Developer 2005 Express Edition Beta 2" to "Visual Studio 2005 Beta 2"
Newby question: I am learning ASP.NET and downloaded "Visual Web Developer 2005 Express Edition Beta 2" in order to practice and learn the ropes.I just received "Visual Studio 2005 Beta 2" and would like to upgrade. However, I haven't found any reference to removing "Visual Web Developer 2005 Express Edition Beta 2" before installing "Visual Studio 2005 Beta 2".Should I remove it?What do I need to back up before doing so?Thanks in advance,Ira I believe you can install VS on top of VWD. They, in fact, can coexits (although they will share some files).Thanks----------------------------------...

Visual Studio.Net and Visual Database Tools (SQL Server)
I am using Visual Studio.Net and SQL Server 2000 Developer's Edition. When I open VS.Net and try to use the Visual Database Tools with SQL Server 2000 I don't get all the editing options. I can connect to the database fine, read data from all the databases and tables but I don't have options to create new stored procedures or edit existing ones or edit tables, etc. I figure this is a permissions issue but I haven't been able to get it to work. Does anyone know how to fix this? Thanks, Jason Jason, What edition of VS are you using?--Brian DesmondWindows Server MVP - Directory Servi...

Web resources about - "connections to SQL server files (*.mdf)" error message in Visual studio when adding a new SQL database - asp.net.visual-studio-2005

Resources last updated: 1/22/2016 5:21:23 AM