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!

Connecting to ACCPAC via COMAPI

Status
Not open for further replies.

NeilN

IS-IT--Management
Jun 16, 2004
24
CA
This code has worked on two different clients' ACCPAC systems (with appropriate db/user/pw changes).

Dim accSession As New AccpacCOMAPI.AccpacSession

On Error GoTo ACCPACErrorHandler

accSession.Init "", "AS", "AS1000", "53A"
accSession.EnforceAppVersion = False
accSession.Open "ADMIN", "password", "ACE08D", Date, 0, ""

On the third system for another client, the Open gets:
Run time error '-2147467259 (80004005)'

The two working systems use SQL Server, the third uses Pervasive. The full ACCPAC front end is installed and I've triple checked the userid/password. The VBA project has refs to ACCPAC COM API and ACCPAC CDO Type Library.

The IAP licenses say Max Users: 1 Current Users: 0

What else can I check?
 
The password is always upper case, so "password" should be "PASSWORD". But I don't think that is the problem.
Is this an Accpac VBA macro you are running, or some other VBA macro?
Can you run any other Accpac VBA macro, like one of the sample macros?
 
Thank you!!! Case sensitivity was the issue.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top