Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ACCPAC COM Error Messages are unclear...

Status
Not open for further replies.

BallpointPenguin

Programmer
Oct 23, 2007
12
US
This error message appears whenever I create a new customer in ARCUS (using an AccpacDataview called ovARCUST, and invoking the

SageCRM Connection Failed. System error. Cannot log in to SageCRM web server. Error returned: Logon ERROR:ActiveX component can't create object

The customer record does get created, but it also trips the Try/Catch/Finally code, and it makes life interesting when I'm under a time crunch.

Also, I'm trying to create an order header, and I get this message when I put a value of "C00000028069" to the "CUSTOMER" field in the OEORDH table:

System.Runtime.InteropServices.COMException (0x80004005): Unspecified error
at AccpacCOMAPI.AccpacViewFieldClass.set_Value(Object& pVal)


Does anyone have any ideas as to what might be causing them? I know it's not the field length, because it has a length of 12, and my value is 11 characters long.

Thanks!

John

Also, when I try to create a new order detail.
 
Do you have an error handling routine?
This normally gives you better error messages. Also step through the code to identify the point of failure.
 
The error handling routine is what generated the error messages that I showed above. This was being done in VB.NET.

As for the point of failure, here is what happens:

Code:
llngSuccess = dblink.OpenView("OE0520", oeordh)
[green]'compose the Order Entry Order Header views[/green]
llngSuccess = dblink.OpenView("OE0500", oeordd1)
llngSuccess = dblink.OpenView("OE0740", oeordd2)
llngSuccess = dblink.OpenView("OE0180", oeordd3)
llngSuccess = dblink.OpenView("OE0680", oeordd4)
ary(0) = oeordd1
ary(1) = oeordd4
ary(2) = oeordd3
ary(3) = oeordd2
ary(4) = Nothing
ary(5) = Nothing
ary(6) = Nothing
ary(7) = Nothing
oeordh.Compose(ary)
[green]'.
'.
'.
'... go through customer code...
'.
'.
'.[/green]
With oeordh.Fields
    .FieldByName("template").Value = "1"
    .FieldByName("customer").Value = CustomerID [green]'here. a value of "C00000028069"[/green]
[b][red]***BOOM***[/red][/b]
[green]'.
'.
'.
'... remainder of program...[/green]

We have a Try/Catch/Finally clause that is operating in code that calls the oeordh data creation, and in the catch clause, we have a check to see if the ACCPAC session has errors. When the [red]***BOOM***[/red] occurs, the catch does not find an ACCPAC error, but rather a standard exception, with a .ToString value as shown earlier in this thread.

Is this descriptive enough?
 
I also see that I cut off part of my original post. What I was trying to say was that, when I invoke the .Insert call for the AccPacDataView object I am using for data, then I get the first error message:
SageCRM Connection Failed. System error. Cannot log in to SageCRM web server. Error returned: Logon ERROR:ActiveX component can't create object

We've made sure that Crystal Reports was up to version 11, and that still doesn't seem to cover the situation.
 
Things to look for:
Open and compose all the views used by OE Orders. The best is to record a macro in Accpac and then include all the views recorded in the macro.
Do you do oeordh.Init?
Also check that oeordh.Order=0 before you .Init
 
Thanks for the response, ettienne.

In answer to your question, yes we do have a oeordh.init() call. We don't have a oeordh.order = 0 call, but I'll put that in to see what happens.

This program is designed to be run on the server (where we retrieve encrypted XML files from our web-based store), so I am also wondering whether these problems will go away if I install onto the server... or whether that would just be wishful thinking.

Again, thanks for the responses so far. I somehow doubt that these questions will be the end, so I'll let you all know, good or bad.
 
See what happens if you comment out
.FieldByName("template").Value = "1"

There may be a conflict between the template and the customer, who knows.

Also try
.FieldByName("customer").PutWithoutVerification CustomerID

You may get past the customer, but it could blow up somewhere further.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top