|
DeleteRecord |
|
package Record;
import j4d.open.*;
class Examplet {
/* doDeleteRecord delete the record where the first field = John
*/
public void doDeleteRecord(opProcess process) throws opException{
int mTargetTable = 2;
int mTargetField = 1;
opTable mTable = new opTable(mTargetTable);
opData mData = new opData(ALPHANUMERIC,"John");
try {
//Search the record where the name is "John"
opSearchArray mSearch = new opSearchArray(1);
mSearch.mSearchArray[0] = new opSearch(NONE, mTargetTable, mTargetField, EQUAL, mData);
opSelection mSelection = process.Search(mSearch);
//Delete the record
process.DeleteRecord(mTable);
}
catch (opException er){throw er;}
}
}
|
DeleteRecord |
|