List of available DataBases (.Net API)

    List of available DataBases (.Net API)

    Hi Folks,

    any tipp here for me to get a list of available Palo-Databases on a server?
    I think that rootlistdatabase must be the right function. But it doesn't work.

    Code-Snippet:

    Try
    Dim jpc As New Jedox.Palo.Comm.Connection("localhost", "1234", "user", "pass")
    Catch ex As Exception
    MsgBox(ex.Message)
    End Try

    Dim dbstring As String()
    dbstring = jpc.RootListDatabases() 'crash!

    Wrong way?

    Rest of .Net-api seems to work fine

    best regards

    frank
    Hi,
    I guess the crash comes from the fact that you define jpc inside of try/catch block. If you define it outside or put everything into try/catch it should work:

    Dim jpc
    Try
    jpc = New Jedox.Palo.Comm.Connection("localhost", "1234", "user", "pass")
    Catch ex As Exception
    MsgBox(ex.Message)
    End Try

    Dim dbstring As String()
    dbstring = jpc.RootListDatabases()
    For Each s As String In dbstring
    MsgBox(s)
    Next
    Mit freundlichen Gruessen/ With kind Regards / Meilleures salutations

    Vladislav Malicevic
    VP Development & Support
    Jedox AG

    Post was edited 1 time, last by “v_malicevic” ().