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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accpac Errorcodes

Status
Not open for further replies.

V3nd3tta

Programmer
Jul 22, 2008
21
ZA
Hi , me again.

Got the payments class working fine in C# now, now another question arises.

When I stepped the macro in VBA, if there was something wrong with the data, eg. invoice no being wrong. Then I would get a Message box telling me the data is wrong on the inserts etc.

Now is there a way on the View.Insert() method of the Accpac.Advantage.dll to return the error code as an exception in c# ?

Thanks in advance.
V3nd3tta
 
If you look at how the VBA macro handles the error reporting you could probably create something along those lines in C# using the errors collection.
 
I do not believe that one can use On error goto in c#. I saw the Error class, but can anyone please give me an example of how to use this class from c#.

 
I know one should use try...catch.. but this catches an exception. The exception has got HResult and tells you "unhandles com exception has occured, Hresult efail...".

Now I can extract the hresult from this. the code. But how do I pass this to the Error class in Accpac ? To get a customer error message back ?

kind regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top