Pergunta

I have created a functioning LightSwitch (Visual studio 2012 Pro) application... Now it's time to publish! The only problem is that I can't seem to figure out how to change the schema name to something other than dbo.

That is, I don't want the output tables to be dbo.XXXX, I want them to be my_schema.XXXX instead.

Also, note that the database is on SQL Server 2005.

Does anyone have suggestions on how to achieve this?

Thanks!

Update: Sorry for not being specific. I don't want to change the schema for existing tables in my database. I want my LightSwitch application to use the new schema. I don't mind publishing it and then modifying the schema on the tables, if I can then somehow also modify the LightSwitch application to use the new schema. But ideally, there would be a way to tell LightSwitch to use a different schema when it publishes.

For those who don't know what LightSwitch is, it is a Microsoft .Net Rapid Application Development tool for SilverLight business applications, and is built into Visual Studio 2012. My application is written in VB.Net

Foi útil?

Solução

You can't change the schema name for an intrinsic database (the database that is created with LightSwitch). Maybe you'll be able to in V3, but you can't currently do it in V1 or V2. To achieve this, you'll have to create the database in something like SSMS (SQL Server Management Studio, then attach to it as an external data source.

Seeing as you've already done all the creating in LightSwitch, you could publish it as is, then attach to it as I mentioned above. I hope you don't have screens created, because unless you want to manually edit all of the lsml, you won't be able to use the attached database in any already created screens.

Any time you need to do something "out of the ordinary" with LightSwitch's database, you need to create it outside of LightSwitch, then attach to it. Why? LightSwitch was originally created with the idea in mind that the users didn't need to know anything about SQL Server.

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