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

Error delaring ACCPACXAPILib.xapiView 1

Status
Not open for further replies.

warrickvdb

Programmer
Oct 7, 2003
13
ZA
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.
 
An unreguistered version of ACCPAC just means that you haven't registered with ACCPAC themselves. All installed components will be registered with your OS.

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

Code:
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,

Code:
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."
 
Your welcome.

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."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top