DELETE Command Schemas
Executing a DELETE
The following sections show the schema and response for the following parameterized DELETE statement:
DELETE FROM [My Contacts] WHERE Id=@Id
Mapping the Delete Schema to the Request and Response
A DELETE schema for a solicit-response port contains sections for input parameters and the response. The response contains the rows affected.Schemas for a one-way send port have the same request section, so the request is the same; however, there is no response section, so a one-way send port does not return the affected rows.
DELETE Schema
The schema for a solicit-response port contains sections for the request's input parameters and for the response.
<?xml version="1.0"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.cdata.com/GoogleContactsProvider/2020" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="parameters">
<xs:complexType>
<xs:sequence>
<xs:element name="Id" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="table">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="row">
<xs:complexType>
<xs:sequence>
<xs:element name="Id">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="IsNull" type="xs:boolean" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="AffectedRows" type="xs:int" />
</xs:complexType>
</xs:element>
</xs:schema>
DELETE Request
Below is the input instance:
<ns0:parameters xmlns:ns0="http://www.cdata.com/GoogleContactsProvider/2020">
<ns0:Id>Id_0</ns0:Id>
</ns0:parameters>
DELETE Response
Below is the response returned by the adapter:
<ns0:table AffectedRows="3" xmlns:ns0="http://www.cdata.com/GoogleContactsProvider/2020">
<ns0:row>
<ns0:Id IsNull="true">Id_0</ns0:Id>
</ns0:row>
<ns0:row>
<ns0:Id IsNull="true">Id_0</ns0:Id>
</ns0:row>
<ns0:row>
<ns0:Id IsNull="true">Id_0</ns0:Id>
</ns0:row>
</ns0:table>