Using Batch Delete with WebPublisher PRO


Copyright © 2006 Inmagic, Inc. All rights reserved.

Batch Delete is used to delete multiple records from the textbase in one pass. To use batch delete, in your script function, specify an AC value of BATCH_DELETE:
 

function batchDelete(){

strXmlInput = '<?xml version="1.0" ?>\n' +
'<Query xmlns="http://www.inmagic.com/webpublisher/query">\n' +
'<AC>BATCH_DELETE</AC>\n' + 
'<TN>Cars</TN>\n' +


Next, you need to specify the query criteria that will retrieve the set of records that you want to delete. For example, to delete all the Porsche records in the textbase:
 

'<QY>FIND Name = Porsche</QY>\n' +


Lastly, close the Query tag, and return the XML to the calling page or function:
 

'</Query>\n';
return strXmlInput;
}

There is an example of this function (buildWpQueryForBatchDelete() ) in XmlToWpp.ASP.

See it in action