Products A-Z All Services Can't find what you're looking for? Chat Live!
Products A-Z Can't find what you're looking for? Chat Live!
Can't find what you're looking for? Chat Live!
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
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