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