GetVersionList

To fetch the versions of the documents.

Public Function GetVersionList(ByVal DocId As Long, ByVal StartVersion As Single,ByVal FetchCount As Long, ByRef RetrievedRecCount As Long, ByRef TotalRecCount As Long, ByRef VersionList() As Byte) As Long

 

Parameters

In/out

Name

Data type

Description

In

DocId

Long

Index of Document

In

StartVersion

Single

Starting version

In

FetchCount

Long

fetch count for each batch

Out

RetrievedRecCount

Long

Count of retrieved records in a batch

Out

TotalRecCount

Long

Total records fetched in a batch

Out

VersionList

Byte[TAGDOCVERSIONINFO]

List of versions fetched in the form of the byte array

 

Description

This function is called form desktop when versions for a document are viewed. This function supports fetching of versions in batches where batch count is specified in the parameter 'FetchCount'. If 'FetchCount' is passed less than or equal to zero it is set to 500.

 

Return value

Name

Description

 1

In case of success

-3

Cabinet not connected

-4

Invalid Operation

-201

Insufficient rights for the current operation

 

Example

Dim DocId                           As Long

Dim StartVersion                 As Single

Dim FetchCount                  As Long

Dim RetrievedRecCount       As Long

DimTotalRecCount              As Long

Dim VersionList()                As Byte

Dim gPDb                          As PanDb.pdbCls


Set gPDb = New PanDb.pdbCls

DocId = 109

StartVersion = 1

FetchCount = 10

lRetVal=gPDb.GetVersionList(DocId,StartVersion,FetchCount,RetrieveRecCount, TotalRecCount,VersionList)

if lRetVal <> NG_SUCCESS Then

    MsgBox gPDb.ErrDescription, vbInformation

     Screen.MousePointer = vbNormal

End if