Sunday, February 12, 2012

cannot find database.mdf under app_Data using sql

Why can I not connect to the database created under app_data folder with sql express and view the tables. I am trying to understand the structure of how it works, I have gone through the My personal web site starter kit's files to try and understand how it writes to the database.Why is the databse not visible in SQL express and why are the databases attached database files and not directly in SQL2005.

I'm not sure I understand what you are asking. My version of the Personal Web Site starter kit came with the mdf in with all the other files. In VWD, I chose Add ASP.NET folder, and created an App_Data folder. I moved the Personal.mdf file into it and double clicked, and voila - it opened in Database Explorer.

If I wanted to examine such a database through Sql Server Management Studio (Express), I would attach the file myself to make it available to SSMSE.

|||

In VWD 2005 express, if you select database explorer you will see the connection to aspnetdb.mdf, which is created by personal starter kit. If you try and expand it to view the tables or store procedures it does not allow you to. Why? If I create a database manually in sql server express, and then create a connection via database explorer I can see all the tables created.

Error(This is the error I get when trying to view aspnetdb.mdf in database explorer

An error has occurred while establishing a connection to the server. When connecting to sql server 2005, this failure may be caused by the fact that under the default settings SQL server does not allow remote connections(Provider:SQL Network interface, error 26 errorlocating server/instance specified.

I also cannot create a .mdf file by adding " add new item SQL database"

Error

(Connection to SQL server files(*.mdf) requires SQL server express 2005 to function properly. Please verify the installation of the component or download from URL http://go.microsoft.com/fwlink/?linkid=49251.

SQL Express was installed at the same time when I installed VWD express 2005. So it is installed. I have aslo installed the SQL server managment studio

What I am ultimately trying to achieve is creating a authentication create user, but I do not want to use the Web administration tool for the reason I want the user to enter his information required and then auto generate a password but using his email address as his username, and then sending it to him via email for activation. I would prefer to customise the my ouwn database as to using aspnetdb.mdf


|||

Problem solved. If you install SQL 2000, and then uninstall and instal sql express 2005 it leaves some or other entries behind, thus it will not allow you to edit or view attached mdf database files it will tell you the instance name or server could not be found. I could not find the exact entry in ht registry so I reinstalled my os and applications and now it works fine.

No comments:

Post a Comment