123 lines
7.7 KiB
HTML
123 lines
7.7 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="SQLGetConnectOption - Return current setting of a connect Option" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzadphdapi.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="rzadpfngcono" />
|
|
<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>SQLGetConnectOption</title>
|
|
</head>
|
|
<body id="rzadpfngcono"><a name="rzadpfngcono"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">SQLGetConnectOption - Return current setting of a connect Option</h1>
|
|
<div><div class="section"></div>
|
|
<div class="section"><h4 class="sectiontitle">Purpose</h4> <p><img src="./delta.gif" alt="Start of change" /><samp class="codeph">SQLGetConnectOption()</samp> has
|
|
been deprecated and replaced with <a href="rzadpfngcona.htm#rzadpfngcona"><samp class="codeph">SQLGetConnectAttr()</samp></a>.
|
|
Although this version of DB2<sup>®</sup> UDB CLI continues to support <samp class="codeph">SQLGetConnectOption()</samp>,
|
|
it is recommended that you begin using <samp class="codeph">SQLGetConnectAttr()</samp> in
|
|
your DB2 UDB
|
|
CLI programs so that they conform to the latest standards.<img src="./deltaend.gif" alt="End of change" /></p>
|
|
<p><samp class="codeph">SQLGetConnectOption()</samp> returns
|
|
the current settings for the specified connection option.</p>
|
|
<p>These options
|
|
are set using the <samp class="codeph">SQLSetConnectOption()</samp> function.</p>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">Syntax</h4><pre>SQLRETURN SQLGetConnectOption( HDBC hdbc,
|
|
SQLSMALLINT fOption,
|
|
SQLPOINTER pvParam);</pre>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">Function arguments</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="hsides" border="1" rules="all"><caption>Table 1. SQLGetConnectOption arguments</caption><thead align="left"><tr><th align="left" valign="top" width="18.470149253731343%" id="d0e73">Data type</th>
|
|
<th align="left" valign="top" width="16.23134328358209%" id="d0e75">argument</th>
|
|
<th align="left" valign="top" width="14.55223880597015%" id="d0e77">Use</th>
|
|
<th align="left" valign="top" width="50.74626865671642%" id="d0e79">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr><td align="left" valign="top" width="18.470149253731343%" headers="d0e73 ">HDBC</td>
|
|
<td align="left" valign="top" width="16.23134328358209%" headers="d0e75 "><em>hdbc</em></td>
|
|
<td align="left" valign="top" width="14.55223880597015%" headers="d0e77 ">Input</td>
|
|
<td align="left" valign="top" width="50.74626865671642%" headers="d0e79 ">Connection handle.</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="18.470149253731343%" headers="d0e73 ">SQLPOINTER</td>
|
|
<td align="left" valign="top" width="16.23134328358209%" headers="d0e75 "><em>pvParam</em></td>
|
|
<td align="left" valign="top" width="14.55223880597015%" headers="d0e77 ">Output</td>
|
|
<td align="left" valign="top" width="50.74626865671642%" headers="d0e79 ">Value associated with <em>fOption</em> Depending
|
|
on the value of <em>fOption</em>, this can be a 32-bit integer value, or a pointer
|
|
to a null terminated character string. The maximum length of any character
|
|
string returned is SQL_MAX_OPTION_STRING_LENGTH bytes (excluding the null-terminating
|
|
byte).</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="18.470149253731343%" headers="d0e73 ">SQLSMALLINT</td>
|
|
<td align="left" valign="top" width="16.23134328358209%" headers="d0e75 "><em>fOption</em></td>
|
|
<td align="left" valign="top" width="14.55223880597015%" headers="d0e77 ">Input</td>
|
|
<td align="left" valign="top" width="50.74626865671642%" headers="d0e79 ">Option to retrieve. Refer to <a href="rzadpfnsconx.htm#rzadpfnsconx__tbcono">Table 2</a> for
|
|
more information.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">Usage</h4><p><samp class="codeph">SQLGetConnectOption()</samp> provides
|
|
the same function as <samp class="codeph">SQLGetConnectAttr()</samp>, both functions
|
|
are supported for compatibility reasons.</p>
|
|
<p>If <samp class="codeph">SQLGetConnectOption()</samp> is
|
|
called, and the specified <em>fOption</em> has not been set through <samp class="codeph">SQLSetConnectOption</samp> and
|
|
does not have a default, then <samp class="codeph">SQLGetConnectOption()</samp> returns
|
|
SQL_NO_DATA_FOUND.</p>
|
|
<p>Statement options settings cannot be retrieved through <samp class="codeph">SQLGetConnectOption()</samp>.</p>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">Diagnostics</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="hsides" border="1" rules="rows"><caption>Table 2. SQLGetConnectOption SQLSTATEs</caption><thead align="left"><tr><th align="left" valign="top" width="25%" id="d0e164">SQLSTATE</th>
|
|
<th align="left" valign="top" width="25%" id="d0e166">Description</th>
|
|
<th align="left" valign="top" width="50%" id="d0e168">Explanation</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr><td align="left" valign="top" width="25%" headers="d0e164 "><strong>08</strong>003</td>
|
|
<td align="left" valign="top" width="25%" headers="d0e166 ">Connection not open</td>
|
|
<td align="left" valign="top" width="50%" headers="d0e168 ">An <em>fOption</em> value that requires an
|
|
open connection is specified .</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="25%" headers="d0e164 "><strong>HY</strong>001</td>
|
|
<td align="left" valign="top" width="25%" headers="d0e166 ">Memory allocation failure</td>
|
|
<td align="left" valign="top" width="50%" headers="d0e168 ">The driver is unable to allocate memory required
|
|
to support the processing or completion of the function.</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="25%" headers="d0e164 "><strong>HY</strong>009</td>
|
|
<td align="left" valign="top" width="25%" headers="d0e166 ">Option type out of range</td>
|
|
<td align="left" valign="top" width="50%" headers="d0e168 ">An <em>fOption</em> value that is not valid
|
|
is specified. <p>The argument <em>pvParam</em> is a null pointer.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="25%" headers="d0e164 "><strong>HY</strong>C00</td>
|
|
<td align="left" valign="top" width="25%" headers="d0e166 ">Driver not capable</td>
|
|
<td align="left" valign="top" width="50%" headers="d0e168 ">The <em>fOption</em> argument is recognized,
|
|
but is not supported.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzadphdapi.htm" title="This topic provides a description of each CLI function.">DB2 UDB CLI functions</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |