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

Accpac Integration Error

Status
Not open for further replies.

shaccpac

Technical User
Sep 12, 2008
84
Hi All,

I am using Accpac 5.5 on Windows Server 2008 (64bit).I am trying to open a Accpac session through VB.NET using the following piece of code.

Dim ICGRID As AccpacCOMAPI.AccpacView
Dim ICGRIDFields As AccpacCOMAPI.AccpacViewFields
On Error GoTo ACCPACErrorHandler
mSession.Init("", "IC", "GL2100", ACCPACAppVersion)
mSession.Open(txt_accusername.Text.Trim, txt_accpwd.Text.ToUpper.Trim, txt_acccomp.Text.Trim, Today.Date, 0, "")
mReport = New AccpacErrorReport
mDBLinkCmpRW = mSession.OpenDBLink(tagDBLinkTypeEnum.DBLINK_COMPANY, tagDBLinkFlagsEnum.DBLINK_FLG_READWRITE)
mReport = New AccpacErrorReport
mDBLinkCmpRW = mSession.OpenDBLink(tagDBLinkTypeEnum.DBLINK_COMPANY, tagDBLinkFlagsEnum.DBLINK_FLG_READWRITE)
'mRs.Open(strQuery, mconn)
mDBLinkCmpRW.OpenView("IC0100", ICGRID)

Using the above method I am getting a error as below.

"Unable to cast COM object of type 'AccpacCOMAPI.AccpacSessionClass' to interface type 'AccpacCOMAPI.IAccpacSession'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{B3B13603-A675-11D2-9B95-00104B71EB3F}' failed due to the following error: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))."

Can anyone please let me know why this error is occuring.
Thanks in advance
 
Regacc was run but still error persists
 
I tried referring ACCPAC.advantage.dll instead of COMAPI it is working now but what is the difference between Interop.COMAPI.dll and ACCPAC.advantage.dll?

Any thoughts?
 
Thanks for the info

my sample application run well under windows 2008 server. But when i am trying to run my full application it again giving the com error.



Pls help
 
It's not for web integration. Interop is a way to use com in .net applications (web or otherwise)

I've had this same error on a windows 2008 server we use.
Unfortunately I've not had time to fix it. I moved the application to a windows 2008 r2 server and it works perfectly.

Try installing Accpac to a location other than default? I've heard you should do this on 64bit systems ?
 
Unfortunately i can not ask my client for OS update to R2 since they have some other applications already up and running.

Accpac is installed to some other directory than the default one

Pls help

"SAVE TREES, SAVE WORLD, SAVE MANKIND" and print only if absolutely necessary.
 
Where is your definition for mSession? Show us your includes.

What service pack do you have installed for System Manager. I'm looking at my class IDs and typelib IDs and don't see that GUID that you referenced.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top