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
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