The way I understood it, a project being developed in VWD 2008 Express, unlike in the VS2008, can only access one DB. So, I guess I need absolutely to locate all my tables in a unique DB. By tables, I mean: tables I create for my application as well as the default ones created by the framework (ASPNETDB).
Here's my connection string (Do I need to modify it????)
<connectionStrings>
<add name="MyWebsiteConnectionString"
connectionString="data source=.\SQLEXPRESS;
Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;
User Instance=true"
providerName="System.Data.SqlClient"
/></connectionStrings>
- Should I, after I've created 开发者_运维问答ASPNETDB, merely add my tables in it?
Should I, first create a DB, then add default tables in it??? (how?)
To make it simple for now, I would like that DB to be created under the App_Data folder.
Thank you
a project being developed in VWD 2008 Express ... can only access one DB
This is not true. You may only be able to use a visual wizard for one db (I don't know), but you can certainly connect to as many databases as you need to in your code. After deployment, an asp.net site doesn't even know if you used visual studio at all (it's certainly possible to build a site using notepad, for example) let alone what edition of visual studio you used.
Secondly, the "default [tables] created by the framework" can be created in any database you want using a command line tool that comes with Visual Studio. Just look for the Aspnet_regsql.exe
program.
精彩评论