You are viewing limited content. For full access, please sign in.

Discussion

Discussion

SDK 9.2 Unknown name. (Exception from HRESULT: 0x80020006 (DISP_E_UNKNOWNNAME))

SDK
posted on September 14, 2015

This error happens at the db = client.Database() line of code below:

 

    Dim NewSearch As LFSearch
        Dim AllHits As ILFCollection
        Dim Hit As LFSearchHit
        Dim EntryHit As ILFEntry
        Dim Doc As LFDocument
        Dim strPathName As String = ""
        Dim strParentFolder As String = ""
        Dim db As LFDatabase
        Dim client As New Object
        Dim ClonedConn As New LFConnection
        Dim LFImageEnable As New LFIMAGEENABLE80Lib.ImageEnable
        Dim bOpen As Boolean


        ' Checks whether the Laserfiche client is open.
        bOpen = CBool(LFImageEnable.IsLaserFicheOpen)
        If Not bOpen Then
            LFImageEnable.LoadLaserFiche(True)
            'Login to Laserfiche
            LFImageEnable.Login(DATABASE_NAME, LF_SERVER, USER_NAME, USER_PASSWORD, 2)
        Else
            Try
                'Work-around to avoid error 6000 with every other scan 
                LFImageEnable.Logout()
                LFImageEnable.Login(DATABASE_NAME, LF_SERVER, USER_NAME, USER_PASSWORD, 2)
            Catch ex As Exception
                Select Case ex.Message
                    Case "External component has thrown an exception."
                        LFImageEnable.Login(DATABASE_NAME, LF_SERVER, USER_NAME, USER_PASSWORD, 2)
                    Case Else
                        Throw New Exception(ex.Message)
                End Select
            End Try
        End If


        'Set the integration folder
        INTEGRATION_FOLDER = Microsoft.Dexterity.Applications.Dynamics.Globals.IntercompanyId


        'Access an open Laserfiche client and clone connetion

        Try
            client = GetObject(Nothing, "LFClient.Document")
        Catch ex As Exception
            Throw New Exception("The Laserfiche client is not open.")
        End Try

 

        'Get its connection 
        Try
            db = client.Database()
        Catch ex As Exception
            Throw New Exception("You are not logged into a database.")
        End Try

0 0
replied on September 15, 2015

Thank you, Robert.  Using GetDatabse() solved the error message.

 

 

Marco Alcala

0 0
replied on September 15, 2015

The method is GetDatabase(), not Database(). I get the same error with your code, changing it to GetDatabase() fixes it. I don't know why this would suddenly break in 9.2 though.

0 0
replied on September 15, 2015

Than you for youre reply, Robert.

 

The LFImageenble version is 8.0.6.3.

 

 

Marco Alcala

0 0
replied on September 15, 2015

What is the file version of LFImageEnable80.dll in C:\Program Files\Common Files\Laserfiche\LFObjects (in the file properties under Details)?

0 0
replied on September 14, 2015

This code worked ok with LFSO80 and LFSO81.  It is not working with LFSO92.

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.