问题 问答题

对考生文件夹下的“学生”表、“课程”表和“选课”表进行如下操作:
(1)用SQL语句查询“课程成绩”在80分以上(包括80分)的学生姓名,并将结果按学号升序存入表文件cheng.dbf中,将SQL语句保存在考生文件夹下的cha.txt文本中。
(2)使用表单向导制作一个表单,要求选择“学生”表中的全部字段。表单样式为“彩色式”,按钮类型为“文本按钮”,排序字段选择“学号”(升序),表单标题为“学生浏览”,最后将表单保存为“my”。

答案

参考答案:在命令窗口中输入命令:MODIFY FILE cha,在文本编辑器窗口输入如下程序段:
*******文件cha.txt中的程序段**********************
SELECT DISTINCT(姓名);
FROM选课,学生;
WHERE学生.学号=选课.学号AND成绩>=70;
ORDER BY学生.学号ASC;
INTO TABLE cheng
***********************************************
在命令窗口中输入命令:DO cha.txt,运行程序。其查询结果如图3-51所示。


(2)启动Visual FoxPro,在“工具”菜单选择“向导”—“表单”菜单命令,出现“向导选取”对话框,根据题意数据源是一个表,因此选定“表单向导”,单击“确定”。
步骤一:在弹出的对话框中“数据库和表”选项选择“学生”数据表,并把全部的“可用字段”选为“选定字段”。
步骤二:表单样式选择为“彩色式”,按钮类型选择“文本按钮”。
步骤三:在“排序次序”中选择“学号”,并选择升序排序。
步骤四:把表单标题改为“数据维护”,可以在单击“完成”之前单击“预览”按钮来预览生成的表单,最后单击“完成”按钮。
将表单以文件名为my保存在考生文件夹里。表单结果如图3-52所示。

解析: 本大题1小题考查的是SQL联接查询,设计过程中主要注意两个表之间进行关联的字段。2小题考查的是根据表单向导生成表单内容。考生应该区别数据源为一个表或多个表时所运用的表单向导。

不定项选择
单项选择题

(五)

TOKYO-Our kids, the Japanese government announced, have forgotten how to behave. They can’t be bothered with housework. If they see someone being wronged, they probably look the other way.

Few countries have placed more importance on being well-behaved in public than Japan. The simplest requests for directions often result in guided tours. Smiling shopkeepers are still the rule. Lost wallets usually make their way to their owners.

But according to recent surveys, all that may be going the way of the ancient hair-do. And Japan’s government has gone into something of a crisis mode.

A Japanese Education Ministry Survey formed late in 1999 and made public last month found that Japan moves behind other nations in teaching youngsters right from wrong.

It also reported that Japanese children are less helpful and do far less housework than their foreign peers in all classes. But they are better about taking dirty dishes to the kitchens after dinner.

In addition, Japanese kids are more likely to dry their hair and carry cell phones than American and Chinese kids, according to another survey, by a Tokyo-based tank.

Children in about 8 percent of public school classrooms are so disorderly that teachers cannot hold lessons, further recent reports show. children refuse to sit, to listen or to stop talking.

Older and middle-aged Japanese continue to have a solid sense of good manners and social justice, says Professor Yoshina Hirano from Shinshu University, who was appointed to direct the ministry’s survey.

Despite the knowledge of good manners among adults, the breakdown in manners may be spreading, he said.

It is implied in this passage that Japanese kids().

A.spending much time doing their homework

B.lead an advanced modern life

C.have their hair cut too often

D.often wash dishes after dinner