Error delaring ACCPACXAPILib.xapiView
Error delaring ACCPACXAPILib.xapiView
(OP)
Hi
Below is the code I am using to open a AccPac (5.1 A) session.
I amable to open the session, but as soon as I try to declare the view (last line), it crashes with the error (also below).
I am using an unregistered version of AccPac (30 day Trial). Could that be the reason for the error?
If I try to register the 'A4wcom.dll' through component services, a number of the methods inside the Dll are not registerd. One of those that is not registered is 'xapiView' method. The 'xapiSession' method does get registered.
Code:
Dim session As New ACCPACXAPILib.xapiSession
session.Open("ADMIN", "ADMIN", "RMICON", Now.Today, 0)
Dim ARINVOICE3batch As New ACCPACXAPILib.xapiView
Error:
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in aplaccpac.dll
Additional information: COM object with CLSID {25E6B455-8B9D-11D1-B5A9-0060083B07C8} is either not valid or not registered.
Below is the code I am using to open a AccPac (5.1 A) session.
I amable to open the session, but as soon as I try to declare the view (last line), it crashes with the error (also below).
I am using an unregistered version of AccPac (30 day Trial). Could that be the reason for the error?
If I try to register the 'A4wcom.dll' through component services, a number of the methods inside the Dll are not registerd. One of those that is not registered is 'xapiView' method. The 'xapiSession' method does get registered.
Code:
Dim session As New ACCPACXAPILib.xapiSession
session.Open("ADMIN", "ADMIN", "RMICON", Now.Today, 0)
Dim ARINVOICE3batch As New ACCPACXAPILib.xapiView
Error:
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in aplaccpac.dll
Additional information: COM object with CLSID {25E6B455-8B9D-11D1-B5A9-0060083B07C8} is either not valid or not registered.
RE: Error delaring ACCPACXAPILib.xapiView
If you don't think that your a4wcomm.dll is registered properly you can manually register it with 'regsvr32'. Click start-run and enter (make sure the path given is correct for your computer),
regsvr32 "C:\Program Files\Accpac\Runtime\a4wcomm.dll"
I always use late binding when creating the views. Early binding does not give all the required information, such as which view to open. Here is the syntax that I would use,
Dim ARINVOICE3batch As ACCPACXAPILib.xapiView
Set ARINVOICE3batch = session.OpenView("AR0031", "AR")
Take Care,
zemp
"Show me someone with both feet on the ground and I will show you someone who can't put their pants on."
RE: Error delaring ACCPACXAPILib.xapiView
RE: Error delaring ACCPACXAPILib.xapiView
Take Care,
zemp
"Show me someone with both feet on the ground and I will show you someone who can't put their pants on."