web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Accessing Ax3 from Ax4 (or vice versa)

(0) ShareShare
ReportReport
Posted on by 30
What I actually need to do is create a report that compares the data in CustInvoiceJour between two instances, one of which is Ax3 and the other is Ax4.

Here's what I've tried so far and how that failed.

Accessing Ax4 from Ax3 by COM:
I'm used to using config files to access Ax via COM. The AxaptaCOMConnector.Axapta2 class didn't recognize the Version 4 config file Ax 4 uses and when I tried to alter a Version 1 config file with the relevant data, I ended up with Ax 3 freezing upon calling the logon2 method.

I also tried using Axapta3 class and the logon and logonas methods. The problem is there doesn't seem to be any way to pass the user password. I tried entering my Win user credentials for the proxy user combined with various combinations of supplying configuration by name, by config file and in the form of conf@aos:port, but all that yielded was errors.

Accessing Ax3 from Ax4
Using Axapta2 class by COM fails because it is not found. Registering AxCOM.dll via regsvr32 does nothing. AxCOM.dll cannot be added to References in AOT.

I could add to the Rreferences the Interop.AxaptaCOMConnector.dll that was created by a C# project using AxCOM.dll. Code compiled but got the "CLRobject was not initialized; cannot create CLR object" error. I tried adding the Interop dll to GAC, but it wasn't signed. I tried signing the dll, but AL claimed its not valid (presumably because its not a netmodule, though i believe i have succeeded in something similar in the past).

It was suggested that it might be an interoppermission problem, but no such error is shown and requesting the permission doesn't change anything (tried all the permissions: dll, clr and com);

If anyone has any ideas about how to fix any of the problems or just experience in successfully retrieving data to Ax4 from Ax3 or vice versa, that would be most helpful.

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,075 Super User 2025 Season 2 on at

    Hi,

    If you only want to read data from the AX3 and/or AX4 tables you can use the classes 'OdbcConnection', 'Statement' and 'ResultSet'. Then you can use direct SQL statements for retreiving data.

    regards,

    André

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans