Object Reference > True DBGrid Properties > ExportNextBookmark Property |
ExportNextBookmark Property
The ExportNextBookmark property returns the bookmark after the last row exported by the previous call to the ExportRows method.
TDBGrid.ExportNextBookmark= variant
Read-only at run time. Not available at design time.
If ExportRows has not yet been called, this property returns the bookmark specified (or implied) by the previous call to the ExportBegin method.
The ExportNextBookmark property is typically used in server-side applications that present ad hoc query data as a series of HTML tables containing a small number of rows. In such applications, you can store the value returned by the ExportNextBookmark property in a database or collection object for the next call to the ExportBegin method, as in the following example.
Private Sub WebItem1_Respond()
If Request.Cookies.Count = 0 Then
TDBGrid1.ExportBegin
Else
TDBGrid1.ExportBegin Request.Cookies("user"))
End If
TDBGrid1.ExportRows FileName, False, 10
Response.Cookies("user") = TDBGrid1.ExportNextBookmark
TDBGrid1.ExportEnd
Response.Redirect FileName
End Sub
Note
The ExportNextBookmark property is only valid between calls to the ExportBegin and ExportEnd methods. A trappable error will occur if you attempt to access it in any other context.