This post is machine-translated. The original post in german language can be found here.
These post applies to following version:
Dynamics AX 2012
Dynamics AX 2012
|
|
|
|
|
|
This post is machine-translated. The original post in german language can be found here.
These post applies to following version:
Dynamics AX 2012
|
Find below some code-examples, how to Access external databases from Dynamics AX.
The examples are based on the following entry in MSDN:
How to: Connect to an External Database from X++ Code [AX 2012]
Read access (SELECT)
Write access (INSERT)
Write access (UPDATE)
When performing these code on the client, a 32-bit DSN is required. Running the code on the server - for example via the SysOperation framework - and it is installed on a server using a 64 bit operating system a 64-bit DSN must be configured on the AOS-Server.
Following error Messages could indicate that your are using the wrong DSN:
It is possible to change the access like in following code, to ensure that we are always using the corresponding DSN:
Note:
The 32-bit version of the Odbcad32.exe file is located in the %systemdrive%WindowsSysWoW64 folder.
The 64-bit version of the Odbcad32.exe file is located in the %systemdrive%WindowsSystem32 Folder.