Home Dashboard Directory Help

SQLExpress Error with a different Named Instance of SQL 2008 by Graham Hardy


 as By Design Help for as By Design

Sign in
to vote
Type: Bug
ID: 682435
Opened: 7/31/2011 5:20:18 AM
Access Restriction: Public
User(s) can reproduce this bug


If a user has installed SharePoint 2010 on a Windows 7 machine the default SQLExpress Instance is "SharePoint" which doesn't connect to the default instance of SQLExpress needed by LightSwitch
An error occurred while establishing a connection to SQL Server instance '.\.\SharePoint'.
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.
Sign in to post a comment.
Posted by Microsoft on 11/7/2011 at 3:01 PM
Hi Shane,
To clarify, the Data Connections settings in Visual Studio affect only newly created LightSwitch projects. It also looks like you are prepending the instance name with ".\", instead you should just have the local instance name (LightSwitch prepends ".\" automatically). Note also that the instance must be a SqlExpress instance.

For existing projects you can change the instance name (still has to be an SqlExpress instance) in the LightSwitch project file (*.lsproj). You can change the <SqlExpressInstanceName>SQLEXPRESS</SqlExpressInstanceName>
element, then rebuild.

Please let me know if this work around solves your issue.

Dan Leeaphon
VS LightSwitch
Posted by TimLeung on 10/19/2011 at 3:19 AM
The SQLExpress instance name is set in:

Options ==> Database Tools==>Data Connections

See my reply here for more details:

Posted by Shane Curtis on 10/15/2011 at 10:48 PM
I have a specific named instnace, but LightSwitch automatically tries to connect to '.\SQLEXPRESS', I can't find any settings to tweak or chane that affect this behavior.
Sign in to post a workaround.