51 lines
3.0 KiB
HTML
51 lines
3.0 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="reference" />
|
|
<meta name="DC.Title" content="Handle long-running queries" />
|
|
<meta name="abstract" content="There are at least two ways you can handle long running queries through ODBC." />
|
|
<meta name="description" content="There are at least two ways you can handle long running queries through ODBC." />
|
|
<meta name="DC.Relation" scheme="URI" content="rzaikodbcapifunctions.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1999, 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1999, 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="handlinglongrunningqueries" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>Handle long-running queries</title>
|
|
</head>
|
|
<body id="handlinglongrunningqueries"><a name="handlinglongrunningqueries"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Handle long-running queries</h1>
|
|
<div><p>There are at least two ways you can handle long running queries
|
|
through ODBC.</p>
|
|
<div class="section"> <ol><li>An application can set the SQL_ATTR_QUERY_TIMEOUT connection attribute
|
|
to specify the maximum amount of time a query can run. Note, the query will
|
|
not start if the SQL Optimizer determines that the amount of time needed to
|
|
process the query will exceed the SQL_ATTR_QUERY_TIMEOUT value. The default
|
|
value for SQL_ATTR_QUERY_TIMEOUT is 0 which indicates that the query will
|
|
run until completion.</li>
|
|
<li>An application can call the SQLCancel API. To do this an application
|
|
needs to be multi-threaded. While the long running query is running on one
|
|
thread, another thread calls SQLCancel using the same statement handle.</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzaikodbcapifunctions.htm" title="Learn about implementations issues when using ODBC APIs.">Implementation issues of ODBC APIs</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |