Pergunta

After resolving issues with RIA installation here, I'm still getting this following error. Not much special - I tried to create a new screen based off of data sources from an existing database in a full SQL 2005 instance

An error occurred while establishing a connection to SQL Server instance '.\SQLEXPRESS'. 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. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

I've tried to correct the connection string in the, I guess, autogen'd config file. Even though Visual Studio doesn't seem to think that the file is overwritten on rebuild, the error continues to appear.

How can I use LightSwitch with full SQL 2005 rather than SQL Express?

Foi útil?

Solução

It seems when working Locally, LightSwitch uses SQL Server Express. It puts it's Membership, Roles, and other authentication information here. I don't know any way to get around this locally, but when you go to "Publish" your project, you're given the ability to use a different database/server. You can also use whatever server/database you'd like for your data sources as well.

Hopefully, before V1, they'll allow you to change that. But I haven't found a way yet, without the config being overwritten constantly.

Outras dicas

You can't use it with non Express version during development when you want to use LightSwitch to create your data model. If you deploy your project, as mentioned, you can use the created database with full version and change the connection string.

Although I would be cautious using SQL Server 2005 because LightSwitch is using datetime2 which is new in 2008. (maybe some more 2008 specifics as well)

http://lajak.wordpress.com/2011/10/04/lightswitch-change-default-database-instance/

Here, they are telling how to change instance name both in project level and global level.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top