X++ data selection and manipulation overview
You can use SQL statements, either interactively or in source code, to retrieve and modify data that is stored in the database. You can use the select statement and API methods for these tasks:
Select data: Select the data to view or modify.
- select statement – Fetch records.
Insert data: Add one or more new records to a table.
Update data: Modify the data in existing table records.
Delete data: Remove existing records from a table.
Here are some other statements that you will use in data access:
Transactional integrity helps prevent data corruption and improve scalability.
The Conversion of operations from set-based to record-by-record topic provides information about how you can use the record set–based statements and methods more efficiently.
You can also use the SysDa classes to retrieve and modify data. The extensible SysDa API provides almost all the data access possibilities that are available in X++.
The executeQueryWithParameters API can help mitigate a SQL injection attack.
For information about using joins, see Common misconception about Exists and Notexists joins.