Monday, February 13, 2012

App_Data database not updating.

This is a weird problem. I added a database to the app_data folder, but when I make updates and then run some reports the updates aren't shown. The database is updated, cause queries show the updates and I inspected the database. The updates however, aren't being reflected when I run the reports.Hmmm. Are you sure the reports are running off of the same database as the queries?|||At first they weren't, but then I realized that mistake and added the correct database to the App_data. When I do this, does it copy the database to the App_data folder or does the App_Data folder point to the database. If it is the former is it capable of just pointing to the location or do I have to change all the connections?|||

helsaint:

At first they weren't, but then I realized that mistake and added the correct database to the App_data. When I do this, does it copy the database to the App_data folder or does the App_Data folder point to the database. If it is the former is it capable of just pointing to the location or do I have to change all the connections?

I'd say you need to change the connections to point to the desired database.

|||

Hi,

When you copy the correct database to App_Data, ASP.NET will attach the database automatically when your ASP.NET application is running.

So, you have to check your connection string to see if it is pointing to the correct database file name.

HTH. If this does not answer your question, please feel free to mark the post as Not Answered and reply. Thank you!

|||

Hi I am so stupid. The web_config file's entry for the database for the reports was different from the connection strings. It was pointing to an older version. Had to change that link.

Thanks guys

No comments:

Post a Comment