ibm-information-center/dist/eclipse/plugins/i5OS.ic.cli_5.4.0.1/rzadphddtdcn.htm

138 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="concept" />
<meta name="DC.Title" content="Data types and data conversion in DB2 UDB CLI functions" />
<meta name="abstract" content="This topics shows all of the supported SQL types and their corresponding symbolic names." />
<meta name="description" content="This topics shows all of the supported SQL types and their corresponding symbolic names." />
<meta name="DC.subject" content="data conversion, data types, C data types, SQL data types, default data types, C, SQL" />
<meta name="keywords" content="data conversion, data types, C data types, SQL data types, default data types, C, SQL" />
<meta name="DC.Relation" scheme="URI" content="rzadphdovv.htm" />
<meta name="DC.Relation" scheme="URI" content="rzadpdatatypes.htm" />
<meta name="DC.Relation" scheme="URI" content="rzadpdataconversion.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="rzadphddtdcn" />
<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>Data types and data conversion in DB2 UDB CLI functions</title>
</head>
<body id="rzadphddtdcn"><a name="rzadphddtdcn"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Data types and data conversion in DB2<sup>®</sup> UDB CLI functions</h1>
<div><p>This topics shows all of the supported SQL types and their corresponding
symbolic names.</p>
<p><a href="#rzadphddtdcn__tbcsql">Table 1</a> shows all of the supported SQL
types and their corresponding symbolic names. The symbolic names are used
in SQLBindParam(), SQLBindParameter(), SQLSetParam(), SQLBindCol(), and SQLGetData()
to indicate the data types of the arguments.</p>
<div class="p">Each column is described as follows: <dl><dt class="dlterm">SQL type</dt>
<dd>This column contains the SQL data type as it appears in
an SQL statement. The SQL data types are dependent on the Database Management
System (DBMS).</dd>
<dt class="dlterm">SQL symbolic</dt>
<dd>This column contains an SQL symbolic name that is defined (in <samp class="codeph">sqlcli.h</samp>)
as an integer value. This value is used by various functions to identify an
SQL data type in the first column.</dd>
</dl>
<div class="tablenoborder"><a name="rzadphddtdcn__tbcsql"><!-- --></a><table cellpadding="4" cellspacing="0" summary="" id="rzadphddtdcn__tbcsql" width="100%" frame="border" border="1" rules="rows"><caption>Table 1. SQL data types and default C data types</caption><thead align="left"><tr><th align="left" valign="bottom" width="50%" id="d0e69">SQL type</th>
<th align="left" valign="bottom" width="50%" id="d0e71">SQL symbolic</th>
</tr>
</thead>
<tbody><tr><td align="left" valign="top" width="50%" headers="d0e69 ">BIGINT</td>
<td align="left" valign="top" width="50%" headers="d0e71 ">SQL_BIGINT</td>
</tr>
<tr><td valign="top" width="50%" headers="d0e69 ">BINARY</td>
<td valign="top" width="50%" headers="d0e71 ">SQL_BINARY</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e69 ">BLOB</td>
<td align="left" valign="top" width="50%" headers="d0e71 ">SQL_BLOB</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e69 ">CHAR</td>
<td align="left" valign="top" width="50%" headers="d0e71 ">SQL_CHAR, SQL_WCHAR<sup>1</sup></td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e69 ">CLOB</td>
<td align="left" valign="top" width="50%" headers="d0e71 ">SQL_CLOB</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e69 ">DATE</td>
<td align="left" valign="top" width="50%" headers="d0e71 ">SQL_DATE</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e69 ">DBCLOB</td>
<td align="left" valign="top" width="50%" headers="d0e71 ">SQL_DBCLOB</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e69 ">DECIMAL </td>
<td align="left" valign="top" width="50%" headers="d0e71 ">SQL_DECIMAL</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e69 ">DOUBLE</td>
<td align="left" valign="top" width="50%" headers="d0e71 ">SQL_DOUBLE</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e69 ">FLOAT</td>
<td align="left" valign="top" width="50%" headers="d0e71 ">SQL_FLOAT</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e69 ">GRAPHIC </td>
<td align="left" valign="top" width="50%" headers="d0e71 ">SQL_GRAPHIC</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e69 ">INTEGER</td>
<td align="left" valign="top" width="50%" headers="d0e71 ">SQL_INTEGER</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e69 ">NUMERIC </td>
<td align="left" valign="top" width="50%" headers="d0e71 ">SQL_NUMERIC</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e69 ">REAL</td>
<td align="left" valign="top" width="50%" headers="d0e71 ">SQL_REAL</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e69 ">SMALLINT</td>
<td align="left" valign="top" width="50%" headers="d0e71 ">SQL_SMALLINT</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e69 ">TIME</td>
<td align="left" valign="top" width="50%" headers="d0e71 ">SQL_TIME</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e69 ">TIMESTAMP</td>
<td align="left" valign="top" width="50%" headers="d0e71 ">SQL_TIMESTAMP</td>
</tr>
<tr><td valign="top" width="50%" headers="d0e69 ">VARBINARY</td>
<td valign="top" width="50%" headers="d0e71 ">SQL_VARBINARY</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e69 ">VARCHAR</td>
<td align="left" valign="top" width="50%" headers="d0e71 ">SQL_VARCHAR, SQL_WVARCHAR<sup>1</sup> </td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e69 ">VARGRAPHIC </td>
<td align="left" valign="top" width="50%" headers="d0e71 ">SQL_VARGRAPHIC</td>
</tr>
<tr><td colspan="2" valign="top" headers="d0e69 d0e71 "><dl><dt class="dlterm"><sup>1</sup></dt>
<dd>SQL_WCHAR and SQL_WVARCHAR can be used to indicate Unicode data.</dd>
</dl>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="rzadpdatatypes.htm">Other C data types in DB2 UDB CLI functions</a></strong><br />
</li>
<li class="ulchildlink"><strong><a href="rzadpdataconversion.htm">Data conversion in DB2 UDB CLI functions</a></strong><br />
</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzadphdovv.htm" title="Find out how you code your applications to use the DB2 CLI functions.">Write a DB2 UDB CLI application</a></div>
</div>
</div>
</body>
</html>