Reputation: 23
I've created a local database in my C# Windows Application and I'm inserting data into a table in the database. My question is why can't I see the data in the table when I view the table in the server explorer? I see that there's a database in the /bin/debug folder that's getting the data but thats not the one thats available in the server explorer. Is there a setting somewhere in Visual Studio 2010 to use the project database not the debug version?
Upvotes: 0
Views: 1434
Reputation: 546
If you open the App.config you can change the data source of the connectionString to a direct link to your database file. Also, select your database in the Solution Explorer and in the Properties section change the copy to output property to "Do not copy"
Upvotes: 1
Reputation: 10171
Exactly i think, you have two copy of your database.one in your bin folder and another in your server explorer
(with different location).when you add data into table exactly you insert them into database at your bin folder(a copy of your database).
check your address of database in your connection string,it must be the same as address of your database in server explorer.(do you use EF
?)
Upvotes: 0