问题 填空题

“学生成绩”表含有字段(学号,姓名,数学,外语,专业,总分)。下列程序的功能是:计算每名学生的总分(总分=数学+外语+专业)。请在程序空白处填入适当语句,使程序实现所需要的功能。
Private Sub Command1_Click()
Dim cn As New ADODBConnection
Dim rs As New ADODB.Recordset
Dim zongfen As ADODB.Field
Dim shuxue As ADODB.Field
Dim waiyu As ADODB.Field
Dim zhuanye As ADODB.field
Dim strSQL As String
Set cn=CurrentProject.Connection
strSQL="Select *from 学生成绩"
rs.OpenstrSQL,cn,adOpenDynamic,adLockOptimistic,adCmdText
Set zongfen=rs.Fields("总分")
Set shuxue=rs.Fields("数学")
Set waiyu=rs.Fields("外语")
Set zhuanye=rs.Fields("专业")
Do While (14)
zongfen=shuxue+waiyu+zhuanye
(15)
rs.MoveNext
Loop
rs.Close
cn.Close
Set rs=Nothing
Set cn=Nothing
End Sub

答案

参考答案:rs.Update

解析: Do while…Loop语句是在条件式结果为真时,执行循环体,并持续到条件式结果为假或执行到选择性Exit Do语句而退出循环。在程序中,本循环的作用是遍历记录,求出总分,然后提交。所以本循环的条件式为“Not rs.EOF”(EOF函数的作用是判断是否到达记录的结尾,在到达结尾前,该函数的返回值都是false,所以本空rs.EOF前需要加Not)。通过语句“zongfen=shuxue+Waiyu+zhuanye”求出数学、外语、专业等字段值的总和,最后使用语句“rs.Update”提交该结果。

完形填空
完形填空。
     Long long ago, there was a man whose name was Frank. He loved his   1   very much. A special day
was coming. It was his wife's birthday. Frank decided   2   something for her.
     The next day he   3   home and said to his wife, "I bought something   4   you." "Thank you!" said his
wife   5  . "What have you bought for me?" "I've bought a gold ring. Here it is." He took it out for his wife
to see. Carelessly, he dropped it onto the ground. He began to look for it on the ground,   6   it was dark
in the house and he could not see   7  . Then he went out and began to look for it in the street.
     He looked and looked. After a while, a friend came along. "What's the matter with you?" asked his friend.
"I am   8   for my ring. It was for my wife. But I lost it just now." said the poor man. "  9   did you lose it?"
"I lost it in my house." "You lost your ring in your house, but you are looking for it in the street. How foolish
you are!" "Ah," said the man, "but it is dark in my house. I will never find it there. Anyhow, here in the street,
it is much  10 . I can see everything more clearly." My dear friend, do you think Frank could find his gold ring
in the street?
( )1. A. wife    
( )2. A. to show 
( )3. A. go      
( )4. A. for    
( )5. A. angrily 
( )6. A. but    
( )7. A. something
( )8. A. asking  
( )9. A. Where  
( )10. A. darker 
B. daughter  
B. to buy    
B. goes      
B. with      
B. sadly      
B. so        
B. anything     
B. calling    
B. When    
B. brighter 
C. son      
C. to cook  
C. went     
C. to       
C. happily                     
C. because  
C. nothing  
C. looking  
C. Why      
C. harder   
单项选择题