Description:-
Create Job from AOT
Code:-
After Run the Job Then you will get Infolog for updated Record in table.
First you have to select what
you need using select forUpdate and put your criteria in where clause
And then put the new value in
the field(s) you want to update it and you have to call the update method and
the important thing for updating put the update code inside
ttsbegin;
// your code
ttscommit;
Create Job from AOT
- In the AOT, click Job.
- Right-click the Job node, and then select New Job.
Step 1: Now Create
Job And Run to Modify Record in Table.
static void UpdateMethodSingle(Args _args) { A_Student _Student; // Start the database transaction ttsbegin; // Find the record to be updated and flag the record with the forupdate flag select forupdate _Student where _Student.Student_ID == "CT_004"; if(_Student.Student_ID) { _Student.Student_Name = "Umesh"; info(strFmt("Student ID-%1 Record Updated With Name-%2",_Student.Student_ID,_Student.Student_Name)); _Student.update(); } // Change a value in the table variable //info(strFmt("Student ID-%1 Record Updated With Name-%2",_Student.Student_ID,_Student.Student_Name)); // Copy the values of the table variable to the actual record // End the database transaction ttscommit; }
After Run the Job Then you will get Infolog for updated Record in table.
Now open you
A_Student Table and Check Data.
Thanks for comments.....