问题 问答题

在考生文件夹下有一个数据库gcs,其中gongch表结构如下: gongch(编号C(4),姓名C(10),性别C(2),工资N(7,2),年龄N(2),职称C(10)) 现在要对gongch表进行修改,指定编号为主索引,索引名和索引表达式均为编号;指定职称为普通索引,索引名和索引表达式均为职称;年龄字段的有效性规则在25~65之间(含 25和65),默认值是45。 2.在考生文件夹中有数据库gcs,其中有数据库表gongch。在考生文件夹下设计一个表单,该表单为gcs库中gongch表窗口式输入界面,表单上还有一个名为cmdclose的按钮,标题名为“关闭”,点击该按钮,使用ThisForm.Release退出表单。最后将表单存放在考生文件夹中,表单文件名足form_window。 提示:在设计表单时,打开gcs数据库设计器,将gongch表拖入到表单中就实现了gongch表的窗口式输入界面,不需要其他设置或修改。

答案

参考答案:

解析:1.在命令窗口输入两条命令:
USE gongch &&打开数据表gongch
MODIFY STRUCTURE &&修改数据表结构
打开表设计器后,在“字段”选项卡中为“编号”字段选择一个索引排序,然后单击“索引”选项卡,在此选项卡中,字段索引名默认为“编号”,在“索引”下拉框中选择索引类型为“主索引”,建立表的主索引;以同样的方法为“职称”字段建立普通索引。
在gongch表设计器的“字段”选项卡中,选中“年龄”字段,根据题意,在“字段有效性”的“规则”文本框中输入“年龄<=65.AND.年龄>=25”,限定字段的取值范围。在“默认值”文本框中输入“45”,建立该字段的默认值,如图5-1所示。


2.利用菜单命令“文件”→“新建”,或单击常用工具栏的“新建”图标按钮,打开“新建”对话框,选择“表单”单选项,然后单击“新建文件”图标按钮,打开表单设计器。
在表单设计器中,鼠标右键单击空白表单,选择“数据环境”快捷菜单命令,打开表单的数据环境,将数据库表文件gongch添加到数据环境中,将数据环境中的gongch表拖放到表单中,可看到在表单中出现一个表格控件,此时实现了gongch表的窗口式输入界面,如图5-2所示。


最后在“表单控件工具栏”中,选中命令按钮控件添加到表单中,在属性对话框中修改该命令按钮的Caption属性值为“关闭”,修改Name属性值为cmdclose,双击命令按钮,在 Click事件中输入程序行ThisForm.Release,用来关闭表单。
单击常用工具栏中的“运行”图标按钮,系统首先要求保存该表单文件,在弹出的“另存为”对话框中输入表单文件名form_window,保存在考生文件夹下,运行表单。
本大题第1小题考查的是数据库中数据的完整性,包括实体完整性以及域完整性和约束规则三个方面,这些都是在表设计器中完成的,且只有数据库表才可以进行数据完整性的设置;第2小题中考查的是在表单中设定数据环境,通过表单的数据环境快速建立表单控件和数据之间的联系。

选择题
填空题


How many of us would temp for three years while we waited for the perfect job Not many of us, perhaps. But Wentworth Miller, the "Prison Break" star, said he chose to wait even longer time (1) he found the right job.
"Actually I think it might have been three or four years until I was lucky enough to get guest (2) on TV shows," said Miller, 34, who rose to international stardom (3) to "Prison Break" in 2006. That kind of patience and p will was portrayed in "Prison Break". Miller (4) engineering wizard Michael Scofield, who tries everything to break out of a Chicago (5) with his brother. Miller said he was fond of his character, (6) he said "exists in shades of grey".
Miller comes from a (7) of teachers. He said he didn’t seem fated for a career in the arts, (8) his passion for acting. After (9) from Princeton with an English degree, he moved (10) his parents’ request to Los Angeles to look for a stable life. He started (11) in a little company that made television movies. This (12) simply faxing, filing, walking the boss’ dog and going to the store for the boss’ lunch. Every weekend during the summer, Miller (13) go to the office (14) he didn’t have air-conditioning. "I would hang (15) in the conference room and set up camp and rob the company kitchen," recalled Miller.
(16) , Miller realized he still had questions about his choice. He decided to quit. But the boss said he was making a mistake and offered him a well-paid assistant position. "I eventually (17) that if I did the corporate job, it would be great if I was successful, but I would always wonder about the (18) . If I did the acting and was successful, I would never wonder (19) that job," he explained. He quit and temped (20) many people in the entertainment industry.
Now, he’s a hot star and has people coming up to him at film festivals saying, "Weren’t you the one who (21) to stand by the copy machine "
"That was tough, but I’m glad I have that perspective. Because now I’m at a point (22) big shots laugh at all my jokes and I think, You know, I got coffee for people like you for six years’. So I know what’s (23) , because I’ve seen the other side." But what if, when he was offered the corporate job, there had been more money "It was never about the (24) There’s a kind of excitement that comes along with acting. I can’t find it anywhere else. Even if I had to go back to temping, even if this is not the beginning of an amazing career, I would not (25) making that jum
p."