Good Morning All:
We would like to retreive data from an external oracle database. We currently can do this very easily through .hta or .vbs scripts. However, we are having trouble getting the correct syntax through AX x++. Could anyone shed some light on how the connection code should look in x++? Does anyone have a good example of a live connection to their oracle DB that they would be willing to share? Should this be done using ODBC and TNS? There are a few examples on the web of using ADO connections, but we are not sure if that is the way to go. There are also some other examples, but nothing seemed concrete. I am looking for a start to finish example. Did you install oracle and configure the TNS? Does it matter if odbc is on the server or the client? Any help is much appreciated.
Thank you,
Brian
*This post is locked for comments
I have the same question (0)You can use OdbcConnection class in X++, but honestly, I wouldn't do it unless you talk just about a very few fields.
Specialized frameworks such as ADO.NET will do a lot of work for you (e.g. generates classes from tables so you can development in object-oriented way, with compile-time type control etc.). Doing it all by hand using the simple ugly API in X++ looks like a waste of time to me, even resulting in less robust code (because the lack of compilation checks etc.) and more difficult to maintain.
If you did it on client, each client would need a direct connection to the database. Doing at AOS is much easier and usually much faster (often much closer to the database than clients, can benefit from CIL etc.).
Syed Haris Shah
9
Mea_
4
Rahul Shah
2