RetrieveDoc

Retrieves Images of non-image documents in a file .

Public Function RetrieveDoc(ByVal DocId As Long, ByVal VersionNo As Single, ByVal FileName As String) As Long

 

Parameters

In/out

Name

Data type

Description

In

DocId

Long

Index of document to be retrieved

In

VersionNo

Single

Version no of the document to be retrieved

In

FileName

String

File path where file retrieved is stored 

 

Description

This function is called from both local and shared cabinet. It is called when any non-image document is to be viewed. In case of local cabinet document image is fetched from the dob file present in the local hard disk and for shared cabinet it is fetched through SMS.

 

Return value

Name

Description

 1

In case of success

-1

Invalid cabinet name

-3

Cabinet not connected

-27

Document Image doesn't exist

-201

Insufficient rights for the current operation

-133

User not logged in

 

Example

Dim DocId          As Long

Dim versionNo   As Long

Dim FileName    As string

Dim lRetVal       As Long

Dim gPDb        As PanDb.pdbCls

 

Set gPDb = New PanDb.pdbCls

DocId = 97

VersionNo= 0

FileName = "c:\ProgramFiles\NewgenCommon\SharedDlls\Temp\NGO50.CNT"

lRetVal=gPDb.RetrieveDoc(DocId,VersionNo,FileName)

if lRetVal <> NG_SUCCESS Then

    MsgBox gPDb.ErrDescription, vbInformation

    Screen.MousePointer = vbNormal

    Exit Sub

End If