开发者

save data to DB [duplicate]

This question already has an answer here: 开发者_JAVA技巧 Closed 11 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜