<div class="content"><p>The CancelAccountingQuery method cancels a
previously-initiated query to the <a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_1156c8ef-4d49-462b-9f76-aebcb6c57011" data-linktype="relative-path">accounting</a> database.</p><dl>
<dd>
<div><pre> [id(8), helpstring(&#34;method CancelAccountingQuery&#34;)] HRESULT CancelAccountingQuery(
   [in] BOOL flag
 );
</pre></div>
</dd></dl><p><b>flag: </b>A Boolean value that specifies FALSE to
stop reading data from the database and release the connection, and TRUE to
read all remaining data and release the connection.</p><p><b>Return Values: </b>This method returns 0x00000000
for success or a negative <a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_799103ab-b3cb-4eab-8c55-322821b2b235" data-linktype="relative-path">HRESULT</a>
value (in the following table or in <a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a>
section <a href="../ms-erref/705fb797-2175-4a90-b5a3-3918024b10b8" data-linktype="relative-path">2.1.1</a>)
if an error occurs.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>0x00000000</p>
  <p>S_OK</p>
  </td>
  <td>
  <p>Operation successful.</p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF01FA</p>
  <p>WRM_ERR_WYUKON_NOT_CONNECTABLE</p>
  </td>
  <td>
  <p>Cannot establish a connection to the accounting
  database.<a id="Appendix_A_Target_49"></a><a aria-label="Product behavior note 49" href="1af5b971-a682-44a0-affe-c98947d5e7f7#Appendix_A_49" data-linktype="relative-path">&lt;49&gt;</a></p>
  </td>
 </tr></tbody></table>
</dd></dl><p>The method CancelAccountingQuery cancels a query to the
accounting database after previous calls to either of the methods <a href="9ff1f624-0ff0-4b99-8fca-415fe0385de2" data-linktype="relative-path">ExecuteAccountingQuery (section 3.2.4.3.3)</a>
or <a href="7955c1aa-14ca-4aa5-a6cf-098cc7ca255e" data-linktype="relative-path">GetRawAccountingData (section 3.2.4.3.4)</a>
and before a call to the method <a href="a39ec157-9f23-4b74-85cc-e0f68b50f4c5" data-linktype="relative-path">GetNextAccountingDataBatch (section 3.2.4.3.5)</a>.
The availability of additional database data is indicated by the value returned
in the <i>pbIsThereMoreData</i> parameter of each method. </p><p>Additional <a href="d5942816-752f-480a-9712-38ef0a248b6a" data-linktype="relative-path">IWRMAccounting</a> interface
methods are specified in section 3.2.4.3.</p></div>