设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

返回列表 发新帖
查看: 43675|回复: 107
打印 上一主题 下一主题

【转载 / 文章】Access开发者的摩西十诫

[复制链接]
跳转到指定楼层
1#
发表于 2005-9-29 04:39:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 LucasLynn 于 2011-10-19 22:09 编辑
wish to seek the paths of wisdom." And they caused these commandments to be written and placed before the eyes of those seeking enlightenment.



So heed the words of those who have come before you, and keep these commandments in thine heart as thou dost create thy Database application. If thou shalt only follow these commandments thy burden shall be made light and thy path shall be made straight.



1.Thou shalt design normalized tables and understand thy fields and relationships before thou dost begin. 在开始编程之前,应当先完成表设计、数据常态化、了解每个字段和关系。



2.Thou shalt never allow thy users to see or edit tables directly, but only through forms and thou shalt abhor the use of "Lookup Fields" which art the creation of the Evil One. 永远不要允许你的用户直接看到或者编辑数据表,而是必须通过窗体来进行。不要使用查阅列。



3.Thou shalt choose a naming convention and abide by its wisdom and never allow spaces in thy names. 你应当选择一种命名规则并且严格遵守他,决不允许有任何一个例外。



4.Thou shalt write comments in your procedures and explain each variable. 你应当在你的过程/函数中加入注释,解释每一个变量。



5.Thou shalt understand error handling and use it faithfully in all thy procedures. 你应当理解错误处理,并且在你所有的过程/函数中忠实地使用他。



6.Thou shalt split thy databases. 你应当分离你的数据库



7.Thou shalt not use Autonumber if the field is meant to have meaning for thy users. 如果一个字段对你的使用者而言有任何应用上意义,不应当对其采用自动编号。



8.Thou shalt not copy and paste other people's code without at least attempting to understand what it does. 你不应当复制/粘贴他人的代码,而没有哪怕至少是尝试着去理解这段代码是做什么的



9.Thou shalt not use "SendKeys", "Smart Codes" or "GoTo" (unless the GoTo be part of an OnError process) for these will lead you from the path of righteousness. 你不应当使用“SendKeys”“Smart Codes”或“GoTo”(除非GoTo作为错误处理的一部分),他们将把你导向错误的方向。



10.Thou shalt back-up thy database faithfully, working not on thy Production Database, but on the Prototype Copy, as it is right and good to do. 你应当备份你的数据库,不要在产品数据库上进行工作,而应当在原型副本上工作,这才是正确的方法



Thus spake the gods of the Database, and blessed be their names! And Blessed, too, are those who contribute to the Access Newsgroup - giving freely of themselves to serve those who hunger and thirst for knowledge and understanding!

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏4 分享分享1 分享淘帖 订阅订阅
2#
发表于 2005-9-29 05:58:00 | 只看该作者
第二条中提到:不要使用查阅列。可是罗斯文数据库中就使用了查阅向导表字段的。
3#
发表于 2005-9-29 07:37:00 | 只看该作者
你不应当使用“SendKeys”“Smart Codes”或“GoTo”(除非GoTo作为错误处理的一部分),他们将把你导向错误的方向。

sendkeys我经常用。不知它有什么副作用?
4#
 楼主| 发表于 2005-9-29 08:02:00 | 只看该作者
不要问我为什么,这些是微软MVP站上MVP们总结出来的十诫,我只是翻译一下。

(悄悄告诉你,其实偶也不是很清楚,但是知道没搞清楚以前照做肯定没错^_^)

[此贴子已经被作者于2005-9-29 9:22:32编辑过]

5#
发表于 2005-9-29 17:19:00 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
6#
 楼主| 发表于 2005-9-30 19:48:00 | 只看该作者
以下是引用zyp在2005-9-28 23:37:00的发言:

你不应当使用“SendKeys”“Smart Codes”或“GoTo”(除非GoTo作为错误处理的一部分),他们将把你导向错误的方向。

sendkeys我经常用。不知它有什么副作用?







Bugs: Numlock key keeps turning off

(Q) When I run some code in a form, the Numlock key sometimes turns itself off. Why is this happening?

(A) There is a well known bug in all versions of Access involving SendKeys switching off the Numlock key. There are very few occasions where Sendkeys is absolutely required and the best answer to this problem is to try and avoid it's use. 如上描述,SendKeys存在一个BUG,将导致NumLock被锁死。

[此贴子已经被作者于2005-9-30 11:59:41编辑过]

7#
发表于 2005-10-3 05:24:00 | 只看该作者
谢谢版主还好,这种情况我还碰到。不过以后会尽量避开它了。
8#
发表于 2005-10-22 19:47:00 | 只看该作者
9#
发表于 2005-11-5 03:31:00 | 只看该作者
顶!没有人知道查阅列的禁忌?我好用 [em04]
10#
发表于 2005-11-9 05:33:00 | 只看该作者
收获良多,谢谢分享!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-5-4 18:59 , Processed in 0.195751 second(s), 35 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表