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

Question

Question

laserfiche developer toolkit

SDK
asked on September 25, 2019

We are still using Laserfiche 8.3.  I was trying to use the SDK for version 8. I have gone been going through the SDK Documentation.  I have tried a simple .net code and vbscript to connect to our Laserfiche Repository, I don't receive any errors, but when I go to the Admin Console I don't see the test user connection.  So I am not sure if I am doing something incorrect or why it isn't showing the connection if it actually connected.

0 0

Replies

replied on September 26, 2019 Show version history

Really depends on your code. I know using VB with the LFSO I have code like:

        ' Attach to the server.
        Dim LFApp As New LFApplication
        Dim server As LFServer = LFApp.GetServerByName(sServer)

        ' Select the repository.
        Dim m_Database As LFDatabase = server.GetDatabaseByName(sRepository)
        Dim conn As New LFConnection

        ' Try to login with information obtained from the XML file
        conn.ApplicationName = "ExportLF"
        conn.UserName = sUser
        conn.Password = sPass
        Try
            conn.Create(m_Database)
        Catch ex As Exception
            Console.WriteLine("Cound not connect to repository with provided credentials.")
            Pause()
            End
        End Try

The actual connection is not created until the conn.Create(m_Database) and will show up as ExportLF. If the ApplicationName is left blank, it is possible that it would have a default similar to the client.

 

Using ImageEnable though, it connects using the same connection and would not show up in the admin console. That looks more like the following.

            Dim oImageEnable As New ImageEnable
            Dim currentEntryID
            Try
                currentEntryID = oImageEnable.GetSelectedItemID(1, 3)
            Catch ex As Exception
                MsgBox("An error occured... " & ex.Message)
                Throw (ex)
            End Try

            ' Get the laserfiche connection.
            Dim client As LFClient.Document = GetObject(Nothing, "LFClient.Document")
            Dim conn As New LFConnection
            conn.CloneFromSerializedConnection(client.GetEngineConnection())
            Dim database As LFDatabase = conn.Database

 

 

0 0
replied on October 7, 2019

Thanks for sending me a response.  I have been able to get my connection to work.   I was using a program that uses .net code.  The problem seems to be I was unable to instantiate the program that way.  I had to use a .net code window that was able to handle the code instead trying to get the program to use the .net code.

 

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

Sign in to reply to this post.