Thursday, February 9, 2012

Are the databases created within VWD Express accessible by aspnet_regsql.exe or Management

Hi,

When I attempt to add the membership functionality to a database created within VWD Express, by using the aspnet_regsql.exe application (connecting to ./SQLEXPRESS using Windows authentication), the database I've created within VWD Express doesn't appear within the list of accessible databases. I have the same problem when attempting to access the same database within Management Studio Express.

Does this mean that databases created from within VWD Express don't use the same storage mechanism or paradigm as those already available within Management Studio Express? Or perhaps I need to somehow register the database using Management Studio Express? As a side note, I'm not sure if the "File/Open File" menu option within Management Studio Express holds the answer to my problems, but rather bizarrely, it crashes Management Studio Express when I select it.

Apologies for the rambling - in essence my question is "How can I make databases created within VWD Express appear within aspnet_regsql.exe and/or Management Studio Express?"

Many thanks,

Jon

Hey,

You can attach them. However, I had problems with any database in my documents showing up. But attaching is the process that makes it work. So you will want to attach database from the list of options, and then navigate to the database.

|||

http://forums.asp.net/thread/1456464.aspx

Step 1 to 6 will do what the previous poster said :)

|||

Thanks for your help folks.

So the only problem I have remaining is that (as stated in the referenced post) Management Studio can't see the database in order to attach it unless I move it out of my home directory (presumably a file permissions problem). Ideally I need both VWD and Management Studio to be able to access the database without moving it between two different locations. Which leaves me with two options:

1) Change the permissions on my home directory such that Management Studio can see the MDB/LDB and therefore attach it. However, I'm not sure what permissions I'd need to change.

2) Move the MDB and LDB out of my home directory and to a place where Management Studio can see them (e.g. the standard database directory for SQL Server 2005 Express) and update the path of the database within VWD. However, VWD doesn't appear to allow me to change the path of the database within the database properties in Solution Explorer.

Can anybody advise on how to do either of the above, and/or which approach is preferable?

Many thanks.

|||If you want both to be able to see it, your best bet is to put the database files in the SQL Server directory (where all the other databases are), attach it, and then change your connection string in your project to access the database by IP address instead.

The MDF-in-APP_DATA approach is when you're going to use VWD exclusively to deal with it. Otherwise, go the "good old fashionned way", which is to let SQL Server handle the database fully.|||

Yep, that's what I ended up doing anyway - thanks for the confirmation.

Not sure why they don't just put the MDB/LDB in the SQL Server data directory in the first place...

|||Because if you only use VWD, and your host supports sql server 2005 with attach, you can do XCOPY deployement, while if they put the mdf in the sql server directory, you need to export the database :)

No comments:

Post a Comment