ComponentOne List 8.0 for ActiveX
ExportBegin Method

 

True DBList Reference> TDBList Methods> ExportBegin Method

ExportBegin Method

The ExportBegin method prepares the list for export to an HTML file by creating an internal clone of the current recordset.

Syntax

TDBList.ExportBegin [bookmark]

Arguments

bookmark is an optional bookmark that specifies the first row to be exported. If omitted, the first available row is used.

Return Value

None

Remarks

Method applies to TDBList control.

Each call to the ExportBegin method must be matched by a corresponding call to the ExportEnd method.

You must call the ExportBegin method prior to calling the ExportRows method, which outputs an HTML table to a specified file.

These methods are 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 there are no cookies, start exporting from the

    ' beginning of the file, otherwise the "user" cookie

    ' contains the bookmark of the next row to be exported.

    If Request.Cookies.Count = 0 Then

        TDBList1.ExportBegin

    Else

        TDBList1.ExportBegin Request.Cookies("user"))

    End If

 

    ' Export ten rows, overwriting the file's contents

    TDBList1.ExportRows FileName, False, 10

 

    ' Store the next bookmark in the "user" cookie

    Response.Cookies("user") = TDBList1.ExportNextBookmark

 

    ' Terminate the export operation and redirect the

    ' browser to the file containing the HTML table.

    TDBList1.ExportEnd

    Response.Redirect FileName

End Sub

See Also

TDBList and TDBCombo Controls

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback