在数据库中永久保存数据 [英] Save data permanently in database
本文介绍了在数据库中永久保存数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
家伙,我有我的数据库中保存的数据有问题。结果我开发的系统在数据库中保存的数据,并在数据网格显示的数据和运行平稳,但问题是,每当我重新启动或重新启动应用程序的数据消失,数据库再次为空,但数据库中的数据显示使用表中的数据直接输入,并没有消失。结果我失去了我的程序的东西吗?
Guys I have a problem in saving data in my database.
The system I am developing saves data in the database and displays the data in the datagrid and that runs smoothly, but the problem is whenever I restart or reboot the application the data disappears and the database was again empty but the data entered directly in the database using show table data, didn't disappear.
Am I missing something in my program?
推荐答案
执行以下步骤:
- 右键点击您Database.mdf或数据库从解决方案资源管理
- .ACCDB数据库文件,点击属性
- 选择不要复制从复制到输出目录下拉列表
- 记住关闭数据库,如果它是在访问打开
- Right click on your Database.mdf or Database.accdb database file from solution explorer
- Click on properties
- Select 'Do Not Copy' from COPY TO OUTPUT DIRECTORY drop down list
- Remember to close your database if it was opened on access
这篇关于在数据库中永久保存数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文