울어라휘파람새야

AbsolutePage - 숫자 표시의 의미 본문

밥줄/ASP

AbsolutePage - 숫자 표시의 의미

꼬꼬리코 2009. 11. 4. 21:48
페이징 결과 페이지 숫자 자리에 -1 이라고 나와있길래 뭐여 이거?
하면서 찾아보다보니 아래의 내용을 찾을 수 있었다.












PROPERTY:  Recordset::AbsolutePage

PositionEnum = recordsetobject.AbsolutePage
recordsetobject.AbsolutePage = PositionEnum
long = recordsetobject.AbsolutePage
recordsetobject.AbsolutePage = long


The AbsolutePage property sets or returns a long value that is the page number in the Recordset object. When you set this property to a page number, you will be moved to the first (top) record on the page you have specified. The AbsolutePage property may also return one of the PositionEnum constants. Note that you cannot set this property to any of the PositionEnum constants.

The first page is always numbered one. You use the PageSize property to set how many records are on a page. You use the PageCount property to determine how many pages are in the Recordset.

You can only use this property if AbsolutePage, PageCount, and PageSize are all supported by the provider (i.e., bookmarks are supported). You must also be pointing to a valid record when attempting to use this property. If you are not pointing to a valid record, this property will return one of the PositionEnum constants which specify the current position of the record pointer in the Recordset.

PositionEnum Constants
 
Constant Value Description
adPosUnknown -1 The Recordset is empty, the current position is unknown, or not supported by the provider
adPosBOF -2 The current record pointer is before the first record at the beginning of the file
adPosEOF -3 The current record pointer is after the last record at the end of the file

 
Code (VBScript):
objRecordset.PageSize = intPageSize
objRecordset.AbsolutePage = 1


사이트 주소 : http://www.devguru.com/Technologies/ado/quickref/recordset_absolutepage.html
Comments