网站制作学习网ASP→正文:Bookmark
字体:

Bookmark

ASP 2008/2/16 10:50:15  点击:不统计

The Bookmark property specifies a bookmark. The bookmark saves the position of the current record.

Bookmark属性的作用是:制定一个书签。该书签将保存当前记录的指针位置。

mdb和sql都支持书签



To save the bookmark for the current record, assign the value of the Bookmark property to a variable. To return to the "bookmarked" record, set the Bookmark property to the value of that variable.

你可以在一个变量中指定一个书签值来保存当前记录指针;你也可以通过设置指定书签变量值来返回指向的记录。



Note: The Bookmark property is available only in Recordset objects that support bookmarks.

注意:书签属性仅可以在支持书签属性的记录集对象中使用。



Syntax

语法

objRecordset.Bookmark



Example

案例

<%

set conn=Server.CreateObject("ADODB.Connection")

conn.Provider="Microsoft.Jet.OLEDB.4.0"

conn.Open(Server.Mappath("northwind.mdb"))

set rs = Server.CreateObject("ADODB.recordset")

sql="SELECT Companyname, Contactname FROM Customers"

rs.Open sql, connrs.MoveFirst'Store bookmark of the current record

bkmark=rs.Bookmarkrs.MoveLast'Go to the bookmarked record

rs.Bookmark=bkmarkrs.Close

conn.Close

%>

·上一篇:防sql注入 >>    ·下一篇:定义session 数组 >>
推荐文章
最新文章