SetDocPageImage

Saves image of a document.

Public Function SetDocPageImage(ByVal DocId As Long, ByVal PageNo As Long, ByVal FileName As String) As Long

 

Parameters

In/out

Name

Data type

Description

In

DocId

Long

Index of the concerned document whose image is to be saved

In

PageNo

Long

Page no of the document whose image is to be saved

In

FileName

String

File path that contains the image of the document in a binary form

 

Description

This function is only used for local cabinet .It is called when any image of document is saved or changed. Here image is saved in DOB format .

 

Return value

Name

Description

 1

In case of success

-1

Invalid cabinet name

-2

Local cabinet is read-only

-3

Cabinet not connected

-117

Error in creating file

 

Example

    Dim lRetval                 As Long

    Dim lDocId                 As Long

    Dim lPageNo              As Long

    Dim sFileName           As String

    Dim gPDb                  As PanDb.pdbCls


    Set gPDb = New PanDb.pdbCls

    lDocId = 3

    lPageNo = 1

    sFileName = "C:\test\rock\lisa.bmp"

    lRetval = gPDb.SetDocPageImage(lDocId, lPageNo, sFileName)

    If lRetval <> 1 Then

         MsgBox gPDb.ErrDescription

    Else

          MsgBox " Success "

    End If