126 lines
7.5 KiB
HTML
126 lines
7.5 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="SQLGetConnectAttr - Get the value of a connection attribute" />
|
||
|
<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="rzadpfngcona" />
|
||
|
<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>SQLGetConnectAttr</title>
|
||
|
</head>
|
||
|
<body id="rzadpfngcona"><a name="rzadpfngcona"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">SQLGetConnectAttr - Get the value of a connection attribute</h1>
|
||
|
<div><div class="section"></div>
|
||
|
<div class="section"><h4 class="sectiontitle">Purpose</h4> <p><samp class="codeph">SQLGetConnectAttr()</samp> returns
|
||
|
the current settings for the specified connection option.</p>
|
||
|
<p>These options
|
||
|
are set using the <samp class="codeph">SQLSetConnectAttr()</samp> function.</p>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">Syntax</h4><pre>SQLRETURN SQLGetConnectAttr( SQLHDBC hdbc,
|
||
|
SQLINTEGER fAttr,
|
||
|
SQLPOINTER pvParam),;
|
||
|
SQLINTEGER bLen,
|
||
|
SQLINTEGER *sLen);</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. SQLGetConnectAttr arguments</caption><thead align="left"><tr><th align="left" valign="top" width="20%" id="d0e53">Data type</th>
|
||
|
<th align="left" valign="top" width="20%" id="d0e55">Argument</th>
|
||
|
<th align="left" valign="top" width="20%" id="d0e57">Use</th>
|
||
|
<th align="left" valign="top" width="40%" id="d0e59">Description</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody><tr><td align="left" valign="top" width="20%" headers="d0e53 ">SQLHDBC</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e55 "><em>hdbc</em></td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e57 ">Input</td>
|
||
|
<td align="left" valign="top" width="40%" headers="d0e59 ">Connection handle.</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="20%" headers="d0e53 ">SQLINTEGER *</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e55 "><em>sLen</em></td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e57 ">Output</td>
|
||
|
<td align="left" valign="top" width="40%" headers="d0e59 ">Length of the output data, if the attribute
|
||
|
is a character string; otherwise, unused.</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="20%" headers="d0e53 ">SQLINTEGER</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e55 "><em>bLen</em></td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e57 ">Input</td>
|
||
|
<td align="left" valign="top" width="40%" headers="d0e59 ">Maximum number of bytes to store in <samp class="codeph">pvParm</samp>,
|
||
|
if the value is a character string; otherwise, unused.</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="20%" headers="d0e53 ">SQLINTEGER</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e55 "><em>fAttr</em></td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e57 ">Input</td>
|
||
|
<td align="left" valign="top" width="40%" headers="d0e59 ">Attribute to retrieve. See <a href="rzadpfnsconx.htm#rzadpfnsconx">SQLSetConnectAttr - Set a connection attribute</a> for
|
||
|
a description of the connect options.</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="20%" headers="d0e53 ">SQLPOINTER</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e55 "><em>pvParam</em></td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e57 ">Output</td>
|
||
|
<td align="left" valign="top" width="40%" headers="d0e59 ">Value associated with <em>fAttr</em> Depending
|
||
|
on the value of <em>fAttr</em>. This can be a 32-bit integer value, or a pointer
|
||
|
to a null terminated character string.</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">Usage</h4><p>If <samp class="codeph">SQLGetConnectAttr()</samp> is
|
||
|
called, and the specified <em>fAttr</em> has not been set through <samp class="codeph">SQLSetConnectAttr</samp> and
|
||
|
does not have a default, then <samp class="codeph">SQLGetConnectAttr()</samp> returns
|
||
|
SQL_NO_DATA_FOUND.</p>
|
||
|
<p>Statement options settings cannot be retrieved through <samp class="codeph">SQLGetConnectAttr()</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. SQLGetConnectAttr SQLSTATEs</caption><thead align="left"><tr><th align="left" valign="top" width="25%" id="d0e160">SQLSTATE</th>
|
||
|
<th align="left" valign="top" width="25%" id="d0e162">Description</th>
|
||
|
<th align="left" valign="top" width="50%" id="d0e164">Explanation</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody><tr><td align="left" valign="top" width="25%" headers="d0e160 "><strong>08</strong>003</td>
|
||
|
<td align="left" valign="top" width="25%" headers="d0e162 ">Connection not open</td>
|
||
|
<td align="left" valign="top" width="50%" headers="d0e164 ">An <em>fAttr</em> value that requires an open
|
||
|
connection is specified .</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="25%" headers="d0e160 "><strong>HY</strong>001</td>
|
||
|
<td align="left" valign="top" width="25%" headers="d0e162 ">Memory allocation failure</td>
|
||
|
<td align="left" valign="top" width="50%" headers="d0e164 ">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="d0e160 "><strong>HY</strong>009</td>
|
||
|
<td align="left" valign="top" width="25%" headers="d0e162 ">Attribute type out of range</td>
|
||
|
<td align="left" valign="top" width="50%" headers="d0e164 ">An <em>fAttr</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="d0e160 "><strong>HY</strong>C00</td>
|
||
|
<td align="left" valign="top" width="25%" headers="d0e162 ">Driver not capable</td>
|
||
|
<td align="left" valign="top" width="50%" headers="d0e164 ">The <em>fAttr</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>
|