C#中的数据保存问题 [英] Data saving problem in C#

查看:68
本文介绍了C#中的数据保存问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在反手使用Access女士创建一个应用程序.和前面的C#,我将数据成功插入到数据库中.但是问题是,经过一段时间后,插入的数据从DataBase中消失了.

I am creating a application using Ms Access in back hand. and C# at front, i insert the data successfully into database. But Problem is that after some time the inserted data vanished from DataBase.

推荐答案

数据不太可能只是从Access中消失"-如果这样做的话现在已经知道了,它已经存在很多年了.

有几种方法可能会消失数据:
1)您首先没有在此处编写它-没有执行INSERT语句
2)您写的是它,但是写的不是您想做的地方-错误的表格或错误的字段
3)您将其写在正确的表中,但数据库错误
4)您在正确的位置,正确的数据库中写了它,但后来删除了它-执行了DELETE语句或未提交TRANSACTION.
5)您编写正确,但随后覆盖了数据库.

我们不能说是哪个.在应用程序执行停止后,立即使用其他程序查看数据库.数据在那里吗?正确吗?如果是这样,那么您可以开始将其缩小到上面的列表中.
It''s unlikely that data will just "vanish" from Access - if it did we would have known about it by now, it''s been around for many, many years.

There are a few ways that the data may appear to vanish:
1) You didn''t write it there in the first place - no INSERT statement executed
2) You wrote it, but not where you think you did - wrong table, or wrong fields
3) You wrote it in the right table, but wrong database
4) You wrote it in the right place, in the right database, but later deleted it - DELETE statement executed or TRANSACTION not COMMITted.
5) You wrote it correctly, but then overwrote the database.

We can''t tell which of these it could be. Look at the DB immediately after you application execution stops, using a different program. Is the data there, and correct? If so, then you can start narrowing it down on the list above.


这篇关于C#中的数据保存问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆