Hi
I am trying to create a sql server database in the app_data folder of visual studio 2005. It keeps telling me I need the express version. Can I not use the developer version
Thanks
By default installation, SQL Server 2005 Developer version stores its databases' files in places like this (in my computer):C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data
The express version can save a data file in app_data folder to work with visual studio 2005 or VWD. You need different connection strings to access your database.
Here is a sample section of connection strings in a web.config file to access databases (developer version):
<connectionStrings><addname="MSDN_forumConnectionString"connectionString="Data Source=localhost;Initial Catalog=MSDN_forum;Integrated Security=True"
providerName="System.Data.SqlClient" /><addname="NorthwindConnectionString"connectionString="Data Source=(local);Initial Catalog=Northwind;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
|||
Hi
Thankyou for your response. I have no problem connecting to a sql server deveoper version . The problem I have is when I right click app_data foler and add new item & choose databse I get the following error
Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly.
I dont want to use the Express version but the developer version. Hope this make it a bit more clear
Thanks
|||
Hi,
Just as Limno said, if you want to create your database in app_data folder of Visual Studio 2005, you have to install the SQL Server Express edition because other editions of SQL Server does not support attaching database files automatically at runtime.
Thanks.
|||Many thanks for your answer. I have now installed sql server express
No comments:
Post a Comment