问题 问答题 简答题

connection对象常用的方法有哪些?它们的作用是什么?

答案

参考答案:

Open建立一个与数据源连接的对象

Close关闭数据源的连接,并且释放与连接有关的系统资源。

Execute执行SOL命令或存储过程,以实现数据库通信。

BeginTrans开始一个新的任务,即在内存中为事务开辟一片内存缓冲区。

CommitTrans提交事务即把一次事务中所有变动的数据从内存缓冲区一次性地写入硬盘,结束前事务并可能开始一个新的事务。

RollbackTrans回滚事务,即取消并开始此次事务以来对数据的所有操作并结束本次事务操作。

阅读理解

阅读理解。

     Cell phones are all around us. We use cell phones to call our friends, send text messages, play

games, and even take photographs. Now imagine using your cell phone to call your air conditioner. If

this were possible, you could tell your air conditioner to turn on before you got home. Does this sound

impossible to you? Well, it could become possible sooner than you think. In the near future, we might

use cell phones as remote controls for the electrical devices in our homes.

     People are already working to develop different ways to communicate wirelessly with devices we

use every day. For example, it is already possible for cell phones to communicate with laptop

computers. Business people using laptops during meetings can use their cell phones as remote controls.

They can use their cell phones to send instructions to computers to turn on, change pictures, and turn

off.

     With the same technology, people can use their cell phones to control other devices. You can call

your stereo to play music automatically. You can call your lights to turn on when you enter a room.

Maybe even by next summer you will be able to call your air conditioner!

1. What is the main idea of this passage?

A. In the future we will all need air conditioners.

B. Business people need to use computers.

C. Some people like to make phone calls to machines.

D. We will use cell phones as remote controls in the future.

2. Cell phones can be used to turn on and off ________ in the future.

A. a special computer

B. different kinds of devices

C. cell phone companies

D. remote controls

3. Which probably could NOT be controlled by a cell phone?

A. An air conditioner or heater.

B. A computer or printer.

C. A table or a basket.

D. A CD player or MP3 player.

4. When will people be able to use their cell phones as remote controls for their homes?

A. Now.

B. Soon.

C. In ten or fifteen years.

D. Never.

5. Which instructions can be sent to a laptop according to the passage?

A. Play sound and music.

B. Start and shut down.

C. Call again and hang up.

D. Go faster and go slower.

单项选择题 A3/A4型题