ProLinga-4GL Reference Manual |
---|
DATAMODEL — Modify datamodel and matching database table.
DATAMODEL
APPEND
data_model_name
DATAMODEL
SELECT
data_model_name
TABLE
table_name
[
CONDITION
condition
[condition
...]
]
DATAMODEL
REMOVE
data_model_name
DATAMODEL
UPDATE
data_model_name
The DATAMODEL command loads, appends a row to, removes a row from or updates a row in a datamodel. The database table linked to this datamodel will updated accordingly. All DATAMODEL commands will return a status. As soon as something goes wrong, the status will have a value other than 0. The status can be retrieved by calling the built-in function DATAMODELSTATUS().
| The name of the data model as defined in the development environment. |
| The name of the table where data needs to be changed. |
| Additional SQL conditions can be placed here to limit the numbers of entries in the Data Model. |
. . . . . . CLEAR DATAMODEL Cust DATAMODEL SELECT Cust TABLE Cust FOREACH Cust M-status.Cust = "Active" DATAMODEL UPDATE Cust ENDFOR . . . . . . CLEAR DATAMODEL Devices DATAMODEL SELECT dmDevices TABLE Devices CONDITION "where device_id = '" L-deviceID "'" FOREACH dmDevices M-installDate.dmDevices = DATE() DATAMODEL UPDATE Cust BREAK ENDFOR . . . . . .
<< CONTROL Command | DISPLAY Command >> |