save data to DB [duplicate]
Possible Duplicate:
save data to DB
I am using visual studio 2010
database:express
sql to linq
===================
when inserting data to DB during application execution, it runs correctly.
data is inserted to the DB.
but
when I stop the application and show table data clicked in server explorer does not show data. Why is this so?
========================================
database1.mdf=====> properties =======>copy output direction=copy always database1Dataset.xsd======>properties=====>copy output direction=do not copy dataclasses1.dbml======>properties=====>copy output direction=do not copy
I think you are viewing the "wrong" database file. Set Copy Output Direction of "database1.mdf" to "Do not copy" and manually copy the database file to Debug folder. "Copy Always" will replace the existing database file with a fresh one and thus you lose the previously stored data. Now after stopping the debugging process, check the database file which is located in the "Debug" folder.
精彩评论