What is the SQL server 2005 edition in your connection string? Is it a SQL server 2005 Express edition?
We can attach or visit the database file in “App_Data” folder with “AttachDbFilename=|DataDirectory|\Test.mdf;” in SQL Server 2000 Express edition, so if it’s other editions of SQL Server, you may attach the database file in the “SQL Server Management Studio”
, then remove the “AttachDbFilename=|DataDirectory|\Test.mdf;” from the connection string and modify it as usual.
Jian Kang - ...
All-Star
33132 Points
2465 Posts
Re: Invalid value for key 'attachdbfilename'
Jun 30, 2008 08:31 AM|LINK
Hi prajapatiamit2003,
What is the SQL server 2005 edition in your connection string? Is it a SQL server 2005 Express edition?
We can attach or visit the database file in “App_Data” folder with “AttachDbFilename=|DataDirectory|\Test.mdf;” in SQL Server 2000 Express edition, so if it’s other editions of SQL Server, you may attach the database file in the “SQL Server Management Studio” , then remove the “AttachDbFilename=|DataDirectory|\Test.mdf;” from the connection string and modify it as usual.
Hope this helps.
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.