I'm writing a new maintenance function based on the tutorial - WAD260A – An Employee Maintenance Application
( http://docs.lansa.com/14/en/lansa097/in ... A%7C_____0 )
I understand how the server module is used to insert and update records but I'm confused with the delete. I can't see where it does a delete. I can see how the Data Model invokes the Remove method for the gEmployees collection:
Define_Com Class(#prim_acol<#jtmDataEmployee>) Name(#gEmployees)
Mthroutine Name(DeleteEmployee)
Define_Map For(*input) Class(#jtmDataEmployee) Name(#Employee) Pass(*By_reference)
#gEmployees.Remove( #Employee )
Signal Event(EmployeeDeleted) Employee(#Employee)
Endroutine
So my question is, how does the remove method on the collection actually do a delete of the record from the file?
Delete record from file
- Stewart Marshall
- Posts: 417
- Joined: Thu Nov 05, 2015 5:25 pm
Re: Delete record from file
From what I can see, there is no specific code to actually perform the delete.
You'd need to add a Delete method to the data model which would execute a server routine to delete the record.
You'd need to add a Delete method to the data model which would execute a server routine to delete the record.