DeleteData.java
The following sample code is for deleting data from a table. In this example data matching the criteria
("Region" = 'West') and ("Product Category" = 'Stationary')
are deleted from the "Sales" table.
Before trying it out
public class DeleteData
{
public static void deleteData()
throws Exception
{
ReportClient rc = Config.getReportClient();
rc.login(Config.LOGINNAME,Config.PASSWORD);
String uri = rc.getURI(Config.LOGINNAME,Config.DATABASENAME,"Sales");
rc.deleteData(uri,getCriteria(),null);
rc.logout();
}
private static String getCriteria()
{
return "(\"Region\" = 'West') and (\"Product Category\" = 'Stationary')";
}
public static void main(String[] args)
throws Exception
{
deleteData();
}
}