Invalid value for key 'attachdbfilename'.

R

Ross Culver

I got this error the first time I tried to debug a dynamic data web form. I
created the database using the VS2K5 tool in the app_data directory of the
website (specifically D:\Websites\WarrenLive\Cortana\App_Data\Cortana.mdf).

Here is value for key attachdbfilename in my connection string:
"D:\Websites\WarrenLive\Cortana\App_Data\Cortana.mdf".

I Googled this error and found a post by Gregory A. Beamer which ended with
the following suggestion: " . . . check and make sure you have the file in
the proper location."

Other than putting it in the App_Data directory, what is the 'proper
location'? Or, more to the point, what's wrong with this value?

Thanks.

Ross
 
R

Ross Culver

Apparently the problem was that even though the dynamic data web form was
placed within a folder with the same name as a table in the SQLExpress
database, the form really couldn't find the database.

All I had to do to get past this error was to drag the table from the server
explorer onto the form, which of course created a gridview on the page. By
doing so, the form could now make the connection to the server.

Ross
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top