O'Reilly logo

Learning MS Dynamics AX 2012 Programming by Erlend Dalen, Mohammed Rasheed

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Open Database Connectivity

Sometimes you need direct access to another database, either to read data from the tables, or in some cases, to write data to the tables. You can do that in AX by using an ODBC connection to the other database.

In most cases though, I would recommend having AX integrated with the application layer of the other system rather than the data layer, but I know that sometimes that is not an option.

Reading data from the database:

The following example shows how to set up a connection to a database using ODBC, how to create a SQL statement, how to execute the statement, and how to retrieve and loop through the result.

The database used in these examples is the AX database itself. Remember to consider access permissions. The user ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required