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

Newbie programming advice 1

Status
Not open for further replies.

JoeAtWork

Programmer
Jul 31, 2005
2,285
CA
I am very new to Accpac. I have spent the last few days trying to understand what is involved in doing some custom programming, in order to make a realistic quote.

My background: mostly VB programming, lately moving into .NET (specifically C#).

The situation: the client has an order entry website (ASP.NET), they want any orders put into the website to be automatically put into AccPac (this will avoid duplicate data entry).

My understanding is to use the COM API (being a VB programmer, I am very comfortable using COM objects).

Unfortunately, I do not know which version of Accpac they are using (I am being subcontracted and don't have all the details yet). I have been told that they use a web interface on the client machines, so my understanding is that it would be the Advantage Series.

Question #1
***********
I have seen some example code that uses the COM API, and one thing that alarms me is the error message "VBA macros cannot run where Accpac is deployed as a Web Server" (I often see this in the sample code error handlers when the Errors object is Nothing). Does this mean that I can't use the COM API if Accpac is web deployed (which seems to be the case here)?

Question #2
***********
The web application is not hosted by a third party, so we have generally agreed to use web services to communicate when an order is created. The idea was that I create some C# wrapper classes around the COM API. My classes would have some simple methods for the web app to use (e.g. CreateOrder(OrderID, CustID, ...)).
If their IIS server (the one hosting the web service, not the Web App) is not also the one hosting Accpacc, what do I need to install on it in order to connect to the Accpacc data (besides the COM DLL)? Will there be some licencing issues?

Question #3
***********
We also want to alert the web app when the order becomes invoiced. Is there a way I can "listen" for this event?

I better end this long thread right here. The main thing I need to know if it's possible to do the things listed above?
 
It's all possible, but until you know the version, you're way over your head.

Jay Converse
IT Director
Systemlink, Inc.
 
It's all possible, but until you know the version, you're way over your head.
Actually, whether I'm "in over my head" is precisely what I'm trying to find out.

The actual Accpac operations I need to code are rather simple, add a customer, add an order, add a shipto. I was under the impression I could just use the macro recorder to get the code I need to work with the COM API (with slight modifications).

The architecture that the process requires is what would seem to make this complicated. Does the scenario I described sound hard to implement, even to the veterans out there? Is the answer to that largely dependent on the Accpac version?

I am trying to decide whether I should take on this project. I don't mind learning as I go, but if this requires the knowledge of an Accpac expert then I will probably pass on it. I don't want to make promises I can't keep.

One thing I would really like to understand is that error message I see in some of the sample code: "VBA macros cannot run where Accpac is deployed as a Web Server" - is that just a badly worded error message meaning the user can't run a macro from a browser UI?
 
Ah, you'll be fine, then. You can ignore that message, it's a holdover from the 5.2 days, and it never applied when you were wrapping recorded code with your own C#, C++, Java, or VB code.

Jay Converse
IT Director
Systemlink, Inc.
 
Thanks for your help Jay.

If anybody else has any insights to help a newbie, please feel free to add your advice, especially any "gotchas" I should be aware of. The topic I am particularly interested in is how to set up a listener for the "Invoice created" event (or maybe an alternative, such as periodically checking for new invoices).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top