当前位置: 首页 > 网络学院 > 服务端脚本教程 > ADO > ADO记录集
To be able to read database data, the data must first be loaded into a recordset.
要读取数据库中的数据,首先得将数据加载进一记录集中.
After an ADO Database Connection has been created, as demonstrated in the previous chapter, it is possible to create an ADO Recordset.
在如上一章节所演示的,建立一ADO数据库连接后就能够建立一ADO记录集.
Suppose we have a database named "Northwind", we can get access to the "Customers" table inside the database with the following lines:
假设我们已经有了一名为Northwind数据库,我们就可以用下面这些代码来访问该数据库中的Customes这张表:
<% set rs=Server.CreateObject("ADODB.recordset") |
We can also get access to the data in the "Customers" table using SQL:
我们还可以使用在SQL中的Customers数据表:
<% set rs=Server.CreateObject("ADODB.recordset") |
After a recordset is opened, we can extract data from recordset.
数据集打开后,我们就能够从里面提取我们所需要的数据
Suppose we have a database named "Northwind", we can get access to the "Customers" table inside the database with the following lines:
假设我们已经有了一名为Northwind数据库,我们就可以用下面这些代码来访问该数据库中的Customes这张表:
<% set rs=Server.CreateObject("ADODB.recordset") for each x in rs.fields |
The ADO Recordset object is used to hold a set of records from a database table.
ADO记录集对象是用做寄放来自数据库的记录集
View all methods and properties of the Recordset object.
查看所有Recordset对象的方法和属性