ConnectToPdb

Connects the user to cabinet.

ConnectToPdb(ByVal CabinetName As String, ByVal UserName As String,ByVal password As String,FolderCount As Long,FolderList() As Byte) As Long

 

Parameters

In/out

Name

Data type

Description

In

CabinetName

String

Cabinet name with which to connect

In

 

UserName

String

User who wants to connect

In

 

Password

String

Password for that user

Out

 

FolderCount

Long

Number of folders in the connected cabinet 

Out

 

FolderList  

Byte[TagFolder]

List of all the folders which are in the connected cabinet.

 

Description

This function is called in both local and shared cabinet when user tries to connect to a registered cabinet. It returns the folder count and the list of folders in the cabinet if connected successfully.

 

Return value

Name

Description

 1

In case of success

-1

Invalid INI entry

-3

Cabinet not connected

-7

Incorrect user name/password

-112

INI entry not found

-201

Insufficient rights for the current operation

-133

User not logged in

-999

Installation Expired

 

Example

  Dim  CabinetName        As String

  Dim UserName             As String

  Dim password               As String

  Dim FolderCount           As Long

  Dim FolderList()            As Byte

 Dim lRetVal                  As Long   

 Dim gPDb                     As PanDb.pdbCls

 

 Set gPDb = New PanDb.pdbCls

 

  CabinetName =”oracleCabinet”

  Username = “Abhishek”

  Password = “Password”

 

 lRetVal=gPDb.ConnetToPdb(CabinetName,UserName,Password,FolderCount,FolderList)

 If lRetVal <> NG_SUCCESS Then

        MsgBox gPDb.ErrDescription, vbInformation

        Screen.MousePointer = vbNormal

       Exit Sub

 End If

Note:

The same user account is not used to login to OmniDocs from different applications/machines, if it is used then the previous one will be disconnected. In order to make separate connection  for an application Set UserType property as "S" before connecting to the cabinet.  

ConnectToPdb

Example

 

  Dim  CabinetName        As String

  Dim UserName             As String

  Dim password               As String

  Dim FolderCount           As Long

  Dim FolderList()            As Byte

 Dim lRetVal                  As Long   

 Dim gPDb                     As PanDb.pdbCls

 

 Set gPDb = New PanDb.pdbCls

 gPDb.UserType="S"

  CabinetName =”oracleCabinet”

  Username = “Abhishek”

  Password = “Password”

  lRetVal=gPDb.ConnectToPdb(CabinetName,UserName,Password,FolderCount,FolderList)

 If lRetVal <> NG_SUCCESS Then

        MsgBox gPDb.ErrDescription, vbInformation

        Screen.MousePointer = vbNormal

       Exit Sub

 End If