Welcome to Forums Sign in | Join | Help | Forums
in Search





Make the world a better place.

error in API

Last post 03-27-2008 9:56 AM by David Zeidman. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-27-2008 9:16 AM

    • Garrett Keating
    • Top 100 Contributor
    • User Since: 2006
    • Posts 54
    • Organization: U.S. Naval Academy Alumni Association
    • Products:  Blackbaud NetCommunity, The Financial Edge, The Information Edge, The Raiser's Edge

    error in API

     

     

    I’m trying to do some things with the api via a webservice that I wrote. We do this a lot and I’m getting this error

    System.Runtime.InteropServices.COMException (0x80010105): The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT)) at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at System.Runtime.InteropServices.CustomMarshalers.EnumeratorViewOfEnumVariant.MoveNext() at USNAWebservices.MasterService.lodLeadership(Int32 ID)

     

    I found this solution on your KB BB330194 

    It says I should init the API if it’s Nothing

    And I’m doing that but the error keeps happening…but it’s sporadic, maybe once every 4 times I hit the custom part that displays the list

    We’re on version 5.1.46.7

     

    here is some of the code...

    Dim RE7 As REAPI = initAPI()
            Dim oRelationship As New CRelationship2
            Dim cr3 As New CRelationships2Class
            Dim eTable As New DataTable("Leadership")
            cr3.Init(RE7.SessionContext, ID)
            Try
                If RE7 Is Nothing Then
                    RE7 = initAPI()
                End If
                If RE7 IsNot Nothing Then
                    eTable.Columns.Add("ID")
                    eTable.Columns.Add("Link")
                    eTable.Columns.Add("Name")
                    eTable.Columns.Add("Relationship")
                    eTable.Columns.Add("Email")
                    For Each oRelationship In cr3

    Garrett Keating
    Senior Web Developer
    U.S. Naval Academy Alumni Association and Foundation
    www.usna.com
    customizebbnc.blogspot.com
    www.photosbygarrett.com
    Filed under: ,
  • 03-27-2008 9:56 AM In reply to

    • David Zeidman
    • Top 25 Contributor
    • Posts 164
    • Organization: Zeidman Development
    • Products:  The Raiser's Edge

    Re: error in API

    The code looks alright in principle although unless the first RE7 initialization did not work I cannot undersatnd why it would be nothing later on. What does the initAPI() method do? Does it send back nothing if it did not work? If it is nothing by the try clause what happens when it tries the line previous to this when it uses the RE7.SessionContext. Would this not fail?

     David

    David Zeidman
    Zeidman Development
    http://www.zeidman.info

    Check out my RE API blog
    http://www.re-decoded.com
Page 1 of 1 (2 items)