Deleting records with WebPublisher PRO is similar to updating, except
that you need only specify the MatchField and supply its value. |
||
First, the function needs to have the AC tag set to DELETE: |
||
function buildWpQuery(){ strXmlInput = '<?xml version="1.0" ?>\n' + |
||
Second, the MatchFields are specified to tell WebPublisher PRO the field that will be used to identify the record to be deleted. |
||
'<MatchFields>'+ |
||
Third, a tag with the field name is used between the Record tags with the value that will identify the record to be deleted. If that value is present in more than one record, all matching records will be deleted. If this is a concern, ensure that you are using a unique field or combination of fields to identify the record to be removed. |
||
'<RecordSet>'+
|
||
Lastly, close the query tag and return the string to the calling page or function: |
||
return strXmlInput;
|
||
There is an example of this function (buildWpQueryForDelete() ) in XmlToWpp.ASP. |