Wonder if SQL Server 2008 R2 Express edition can be used with C# Express 2010? I'm getting the error below when trying to add 'Service-based Database' item to my projects.
Please note, I've only got SQL Server 2008 R2 Express.
Update 1 - I checked the service (MSSQLSERVER
) and it's up and running, I've got no errors during SQL Server 2008 R2 installation either, the PC didn't have any previous versions of SQL Server installed.
The actual error:
Connections to SQL Server database files (.mdf) require SQL Server
2005 Express or SQL Server 2008 Express to be installed and running on
the local computer. The current version of SQL Server Express can be
downloaded at the following URL:
http://go.microsoft.com/fwlink/?LinkId=125883
Thanks.
Answer
As the message says, Visual C# Express 2010 does not support connections to SQL Server 2008 R2 Express (which is not an upgrade to SQL Server 2008 Express). You could give Visual Studio 2012 a try.
EDIT: It seems like my above statement is not correct. I've tested it and I got SQL Server 2008 R2 Express working with Visual Studio 2010 Premium. So I guess it should also work in Visual C# Express 2010.
In order for it to work I had to change 'SQL Server Instance Name' found in the options under 'Database Tools' --> 'Data Connections'. The default value is SQLEXPRESS but I changed my instance name to SQLEXPRESS2008R2 during installation.
No comments:
Post a Comment