Ms-Access MDB:将备忘录字段分割成多个文本字段。 (为防止数据损坏) [英] Ms-Access MDB: Split Memo field into Several Text fields. (To prevent data corruption)

查看:241
本文介绍了Ms-Access MDB:将备忘录字段分割成多个文本字段。 (为防止数据损坏)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的Access数据库就像后端一样。

我使用了一些备注字段。



我知道备忘录字段是主题导致数据库损坏,因为它们存储在单独的数据页中;该记录只保存一个指向存储实际数据的数据页的指针。



大多数时候,我只需要从100到1000个字符,所以我有一个想法...

我的辉煌(或不)的想法是将备忘录分成4或5个文本字段(每个可以保存255个字符)。



以前有人这样做过吗?

任何已知问题?

这种方法不容易发生数据损坏?谢谢,

Jag



PS

1。我以前有腐败问题。

2.我知道最好的办法是迁移到另一个后端,但不可能。

解决方案

更好的解决方法是将备忘录数据页从附加的记录中分拆。这样做的方法是将备忘录字段放在单独的表中。您可以使用1:1表(在表中具有多个备忘录),或者更好地,作为具有备注类型字段的1:N表。后一种方法是完全避免备忘录指针问题的唯一方法,但是如前面的解决方案那样,备忘录表中任何备忘录指针的损坏都会导致您丢失所有这些问题。



此外,您应该考虑为什么您的数据库正在破坏备忘录指针。除了上述建议之外,您应该可以考虑编辑您的备忘录,但由于您似乎没有使用Jet MDB的Access前端,这可能不是问题。我每隔一段时间看到备忘录腐败,但不是很频繁。如果您经常看到它,建议您,您的应用程序设计不当或您的操作环境显着不合标准。


I use an Access database used just as back end.
I use some Memo Fields.

I have learnt that Memo Fields are subject to cause database corruption because they are stored in a separate data page; the record only holds a pointer to the data page where the actual data is stored.

Most of the time I just need from 100 to 1000 chars or so, so I had an idea...
My "brilliant" (or not) idea was to split the memo into 4 or 5 Text Field's (they can hold 255 chars each).

Anyone has done this before?
Any known issues?
Would this approach be less prone to data corruption?

Thanks,
Jag

P.S.
1. I have had corruption issues before.
2. I know the best thing would be to migrate to another back end, but it isn't possible.

解决方案

The better workaround is to unbundle the memo data page from its attached record. The way to do that is to put the memo field(s) in a separate table. You can either do it with a 1:1 table (with multiple memos in the side table), or, better, as a 1:N table with a memo type field. The latter way is the only way to completely avoid the memo pointer problem, though, as in the former solution, the corruption of any memo pointer in the memo table causes you to lose all of them.

Also, you should consider why your database is corrupting memo pointers. Aside from the suggestion above, you should probably consider editing your memos unbound, though since it doesn't seem you are using an Access front end to your Jet MDB that is probably not an issue. I see memo corruption every now and again, but not very often. If you see it often, it suggests to me that your application is badly designed or your operating environment is markedly substandard.

这篇关于Ms-Access MDB:将备忘录字段分割成多个文本字段。 (为防止数据损坏)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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