Problem

How can I delete the data in a table with a few instructions.


Solution

The method removeData (both server side and client side) delete the data in a table under a given condition. An example of usage is as follows:

//Server side
int cnt = dbSession.removeData("<package><table>", "<condition>");

//Client side
int cnt = client.removeData(session, "<package><table>", "<condition>");

the parameters are:
<package><table> Table name (full name with package)
<condition> Condition of the record to delete

method returns the number of records deleted.

Published in Sun, 19 December 2010 00:23