In this chapter, we discussed how to manipulate data using X++. We also saw how to write code that inserts, updates, and deletes records without breaking the relationship that the record has with data in other tables.
The ttsbegin
, ttscommit
, and ttsabort
operators and the selectforupdate
keyword were also introduced to show you how to create and handle a transaction scope.
After reading about insert_recordset
, update_recordset
, and delete_from
, you also learned how to manipulate many records within one database transaction, which is a lot more efficient than using the insert
, update
, or delete
methods.
In addition, we also went through the difference between the insert
, update
, and delete
methods and the doInsert
, doUpdate
, and doDelete
methods.
In the next chapter, we will use the knowledge gained in this chapter and look at how we can use it to integrate data with other systems. We do this by reading and writing text files and XML files in addition to other databases using an ODBC connection. We will also create a class library that can be used for specialized data import and export operations to and from AX.
18.191.236.174