.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Add Database through App_Data Error- Connections to SQL Server Files (*.mdf) require SQL Express

Posted By:      Posted Date: October 05, 2010    Points: 0   Category :Sql Server

I am trying to add a new database via the App_Data Folder and I receive an error described below.

I had attached an mdf file to try to use it in SQL Server 2008 Developer and Visual Studio 2010, which was is included in a book's lesson.  Whenever I try to add a database within the App_Data Folder I get an error.

I can create a db by attaching an mdf via SQL Server Mgmt Studio, it connects fine, and I can see tables.

Mgmt Studio- Right Click Databases, Attach, Add, then once mdf is located:

The mdf file location, Database Name, Attach As, -- are all the same:


Do I need to change the Database Name?

Visual Studio- Server Explorer connects fine to mdf OR regular Database, I can see the tables.

However when I attempt to add ANY TYPE OF SQL SERVER DATABASE through the App_Data folder I receive this error "Connections to SQL Server Files (*.mdf) require SQL Server Express 2008 to function properly.  Please verify the installation of the component or download from the URl."

I tested this for both a normal dbo (non mdf) and the mdf.dbo I attached before, with the same error!

Im running XP SP3 w/ Visual Studio 2010 and SQL Server 2008 R2 Developer.  I had previously removed SQL Server Express.

View Complete Post

More Related Resource Links

Connections to SQL Server Files (*.mdf) require SQL Server Express 2005

When ever I click on an MDF file in VS2005 I get the following message.Required Components Missing.Connections to SQL Server Files (*.mdf) require SQL Server Express 2005 to function properly.  Please verify the installation of the component or download from the URl: http:go.microsoft.com/fwlink/?linkID=49251.I think this may have been due to the install order and options I selected.1. VS2005 Pro, without SQL Server Express 2005 as I was planning to install SQL2005 Developer.2. SQL2005 Developer.I then noticed the above problem and installed SQL Server Express 2005 from the VS Pro DVD.  I still have the problem.  Any ideas how I can fix this ?

connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly.


I dont have the SQL EXPRESS installed instead I have SQL Standard Edition.

 I have two SQL Server instances installed.

 1- UserLT (this is sql 2000)
2- UserLT\SQL2005 (this is SQL 2005 named instance)

But when i try to add a database to my VS website project I get the following error:

Connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly. please verify the installation of the component or download from the URL: go.microsoft.com/fwlink/?linkId=4925

I went in Tools>Opetions>DataBase tools>Data Connection>Sql Server Instance Name (blank for default)

and changed the "SQLEXPRESS" to "USERLT\SQL2005".

But I still get the same error message. Any ideas how i can resolve this issue?

Error when running an SQL script to restore a database on SQL Server 2008 R2 Express

Hi, At work, I use SQL Server 2008 Express running on Windows XP Professional Service Pack 3. At home, I also use SQL Server 2008 Express running on Windows XP Professional Service Pack 3. Whenever I do work on the database at work, I usually restore the database at home (or vice versa) I have been using the following SQL scripts to back up the database and to restore the same database (at work or at home). BackupRealEstate.sql USE Master BACKUP DATABASE [RealEstate] TO DISK = N'F:\My Documents\My Database\RealEstate.bak' WITH NOFORMAT, INIT, NAME = N'RealEstate-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 GO RestoreRealEstate.sql USE Master RESTORE DATABASE [RealEstate] FROM DISK = N'F:\My Documents\My Database\RealEstate.bak' WITH  FILE = 1, NOUNLOAD, REPLACE, STATS = 10 GO Everything worked fine until I replaced my 8yo home computer with a newer and faster one. My new home computer is running Windows 7 Home Premium and I use the latest SQL Server 2008 R2 Express. When I tried to run the above restore SQL script, I got the following error message: Msg 3101, Level 16, State 1, Line 2 Exclusive access could not be obtained because the database is in use. Msg 3013, Level 16, State 1, Line 2 RESTORE DATABASE is terminating abnormally. There was no other application/process using this database. Can someone please help me? Regards,

connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly



i've installed SQL server 2005 express and Visual web developper 2005 express.

when i whant to create a database in VWD the following error occures:

connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly. please verify the installation of the component or download from the URL: go.microsoft.com/fwlink/?linkId=49251

i searched the internet but can't find the solution, i already reinstalled my complete workstation but the problem stays.

please help!

Just-In-Time Debugger error when opening SQL Server studio express

Hi,   I am new to these forums; hope I am posing in the correct forum   I have problem opening the SQL Server 2005 Management Studio Express. Getting the error below   'An unhandled win32 exception occurred in ssmsee.exe [5336]'   Searched in many forums but none of the suggestions resolved my issue..   I have re-installed .net 2.0, upgraded to 3.5 but still no luck either   Have re-installed SQL server management studio express again no luck   Deleted the shell folder from both documents and settings and in registry still have the same problem   Appreciated your suggestions to resolve this issue   Many thanks

Multiple XML files into SQL SERVER Express 2005

Hello. I am familiar with classic ASP and use this with MS SQL SERVER EXPRESS. I have an SQL table and want to import multiple XML files into this on a daily basis. I currently have 3 files, transferdata.vbs which loops through the XML files. FAQschema.xml which maps XML to the SQL database and test.xml shows the xml in the test file. If I run transferdata.vbs I get the following error "Error opening the data file" line 33 char 3. Microsoft Bulkload for SQL Server". My SQL table is called EnqOrd id (int), Debitor (varchar), PurchaseDate (varchar)     transferdata.vbs set objBL = CreateObject("SQLXMLBulkLoad.SQLXMLBulkLoad") objBL.ConnectionString = "Provider=SQLOLEDB; Data Source=XXXXXX\XXXXX; Initial Catalog=XXXX; User ID=XXXXX; Password=XXXXXX" objBL.ErrorLogFile = "E:\fuelsql\Teccom\error.log" ' Here is the path to your XML files Const path = "E:\fuelsql\Teccom\XML\" Dim Text, Title, oFile Dim fso, oFolder, oFiles, wsh ' Object variables Text = "Folder " Title = "XML Files" Set wsh = WScript.CreateObject("WScript.Shell") ' Create FileSystemObject object to access the file system. Set fso = CreateObject("Scripting.FileSystemObject") ' Get Folder object. Set oFolder = fso.GetFolder(wsh.ExpandEnvironmentStrings(path)) ' Get All Files Set oFiles = oFolder.

Windows 7 CREATE DATABASE permission denied in database 'master'. (Microsoft SQL Server, Error: 26

Hi I have migrated to a new computer using Windows 7, 6 gig memory, I7 chip (old machine had xp) and have installed Visual Studio 2008 and  SQL Server 2008 R2.  I get CREATE DATABASE permission denied in database 'master'. (Microsoft SQL Server, Error: 262) when I try to create a new database.  Other posts (example:http://social.msdn.microsoft.com/forums/en-US/sqltools/thread/28fee0ed-c7e2-40df-8f79-f513c9848f09/) work for Vista but I cannot find how to grant permissions.  Run as administrator (vista fix) does not work. I have admin privaleges on my machine.  There are no other accounts.    What do I need to do to update privaleges? Thanks and have a nice day.    

Server 2008 R2 Express accepts only local connections?

My question SQL Server 2008 R2 Express accepts only local connections? [closed] was closed unanswered and my account (with the same username/nick vgv8) was banned in 1 min without any warning and notification from all StackExchange sites (StackOverFlow.com, ServerFault.com, SuperUser.com). I could not understand can MS SQL Server 2008 R2 Express  accept remote connections? And what are local connections - in the same subnetwork, AD, workgroup, the same machine? 

Reporting Services Add-In for MOSS2007 : Unable to connect to the database Error at "Set Server Defa

Dear Expert, I've succesfully install the Add-In + configure the reporting services (integrated mode) + activate the features on my MOSS2007. As we know by activating this at my Central Admin, i'm able to see "Reporting Services" under my Application Management as below:   1) Manage Integration Setting   ---> My report url : http://servername:808/ReportServer (Trusted Account) 2) Grand Database Access --->  My setting : <servername> with default instance  3) Set Server Defaults ---> Area that i receive an error "Unable to connect to database" Anybody here have a same experience? please assist me, Thanks in Advanced My Note: OS : Windows Server 2008 Enterprise x64bit (SP2) SQL : SQL 2005 with latest Service Pack (SP3)  My Error Log: <Header>   <Product>Microsoft SQL Server Reporting Services Version 9.00.4035.00</Product>   <Locale>en-US</Locale>   <TimeZone>Malay Peninsula Standard Time</TimeZone>   <Path>c:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles\ReportServer__08_04_2010_10_51_59.log</Path>   <SystemName>SEINE</SystemName>   <OSName>Microsoft Windows NT 6.0.6002 Service Pack 2</OSName>   <OSVersion>6.0.6002.131072</OS

Error Attaching .mdf in SQL Server Management Studio Express

I originally had a database setup using SQL Server 2005 Express that was being accessed by a Point-of-Sale client. I would connect to the server using SQL Server Management Studio and everything worked fine. I was out of the office and someone using my machine uninstalled Management Studio. I reinstalled and tried to attach the .mdf file to the database. However I keep receiving this error: TITLE: Microsoft SQL Server Management Studio Express ------------------------------ Attach database failed for Server 'FRONTDESK-PC\SQLEXPRESS'.  (Microsoft.SqlServer.Express.Smo) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476 ------------------------------ ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo) ------------------------------ Unable to open the physical file "c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\PRM - THOR.mdf". Operating system error 2: "2(The system cannot find the file specified.)". (Microsoft SQL Server, Error: 5120) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.

Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential cau

Attempting to upgrade from SQL 2005 EE to SQL 2008 EE on Vmware ESX 3.5 virtual server. below is info from Detail.txt related to successful install with failures... 2010-09-02 13:50:46 Slp: Sco: Attempting to check if file 'D:\Data\MSSQL.1\MSSQL\LOG\ERRORLOG' exists 2010-09-02 13:50:46 Slp: Sco: Returning security descriptor O:BAG:SYD:AI(A;ID;FA;;;S-1-5-21-3788118842-658835432-3441893140-1006)(A;ID;FA;;;S-1-5-21-3788118842-658835432-3441893140-1007)(A;ID;FA;;;BA)(A;ID;FA;;;SY)S:AI(AU;IDFA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD) 2010-09-02 13:50:46 Slp: Configuration action failed for feature SQL_Engine_Core_Inst during timing ConfigRC and scenario ConfigRC. 2010-09-02 13:50:46 Slp: Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes. 2010-09-02 13:50:46 Slp: Configuration action failed for feature SQL_Engine_Core_Inst during timing ConfigRC and scenario ConfigRC. 2010-09-02 13:50:46 Slp: Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineConfigException: Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes. 2010-09-02 13:50:46 Slp:    at Microsoft.SqlServer.Configuration.SqlEngine.SqlServerServiceBase.WaitSqlServerStart(Process processSql) 2010-09-02 13:50:46 Slp:    at Microsoft.SqlServer.Configuration.SqlEngine.SqlServerServiceSCM.StartSqlServer(St

how to make working WPF 2010 program make changes to SQL Server 2008 Express files

(1) I have a working WPF 2010 program that manipulates a table in SQL Server 2008 Express (2) the program does delete, update, select and insert correctly however in its own project file folder logbooklmk.mdf   logbooklmk_log.ldf (3) I want the actual SQL Server 2008 express files to be changed yes I know the issue is sharing and the copy option only applies to the local project files. I found this out by trying always copy, never copy and copy if newer. I probably have to change the .xsd folder to refer to the actual SQL Server 2008 Express file. Tried that once and it failed. Something about sharing not allowed.

SQL Server 2005 Express - Does it require a Client Access License (CAL)

Do you need a Client Access License (CAL) for each device that will connect to a SQL Server 2005 Express edition database?

Error connecting to Remote report server database in SQL Server 2008 R2 DataCenter Edition

I am trying to configure my report server installed on Server A to point to a reporting services DB on Server B. I am able provide the name and test the connection. However, when i click next on the configuration wizard after providing the Server A name I am receiving the below error: The feature: "Remote access to report data sources and/or the report server database" is not supported in this edition of Reporting Services I have SQL Server 2008 R2 DataCenter Edition on both the servers.    

SQL Server 2008 Express Setup failure: Unknown Property Error

I am trying to install SQL server 2008 on windows 7 but it returns the following error when almost done with installation: TITLE: SQL Server Setup failure. ------------------------------ SQL Server Setup has encountered the following error: Unknown property. . ------------------------------ BUTTONS: OK ------------------------------   Can someone please assist me with this, I have tried for more than a week to go around it. I have also searched online for solutions but in vain. Looking into the log files, I see these: 2010-09-05 21:04:41 Slp: Running Action: Install_SqlBrowser_Cpu32_Action 2010-09-05 21:04:41 Slp: Target package: "C:\Softwares\Database and Management\SQLEXPRADV_x86_ENU\x86\setup\sqlbrowser.msi" 2010-09-05 21:04:46 Slp: InstallPackage: MsiInstallProduct returned the result code 0. 2010-09-05 21:04:46 Slp: RunMsiCore succeeded. 2010-09-05 21:04:46 Slp: Checkpoint: INSTALL_SQLBROWSER_CPU32_ACTION 2010-09-05 21:04:46 Slp: Completed Action: Install_SqlBrowser_Cpu32_Action, returned True 2010-09-05 21:04:46 Slp: ---------------------------------------------------------------------- 2010-09-05 21:04:46 Slp: Running Action: Install_SqlSqmShared_Cpu32_Action 2010-09-05 21:04:47 Slp: Error: Action "Install_SqlSqmShared_Cpu32_Action" threw an exception during execution. 2010-09-05 21:04:47 Slp: Microsoft.SqlServer.Setup.Chainer.Workflow.ActionExec

database size limit about SQL Server 2005 Express

I know that there is a size limit (4 GB) for SQL Server 2005 Express, but I am not quite sure if the limit is applied for only ONE database data file or for ALL the database data, suppose I have two databases DB1 and DB2, so which of the following statement is correct? A. The size limit for DB1 is 4GB, and the size limit for DB2 is also 4GB, so if DB1 is 3G and DB2 is 3.5G,that will be OK. B. The total size for both DB1 and DB2 can not be larger than 4GB, which means if DB1 is 3G, then DB2 can not be large than 1G.

Can't connect my VWD express "sqldatasource" control to a SQL Server Express Database

Good day Sirs,   As the title is saying, I cant seem to connect to my SQL Server Express Database using "sqldatasource" control in Visual Web Developer 2010 Express Steps Taken: clicked "configure data Source" option in the Sqldatasource then "New Connection..." Changed my Data source: to " Microsoft SQL Server Database File (SqlClient) Here comes the problem: 1. I am choosing a Database file name but a problem keeps on popping:     "ServerName This file is in use: Enter a new name or close the file that's open in another program" 2. Then I tried to choose a detached database file (mdf) and it was attached now another problem pops:    "ServerPath cannot be opened becuase it is version 661. This server supports 655 and earlier.   I am using windows Home Edition: does it contribute to my problem? My server and VWDE is in the same equipment(laptop)   Does anyone have an idea why is it like this? Thanks
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend