ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahh_5.4.0.1/dtadset.htm

109 lines
6.6 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="Setting the contents of a field" />
<meta name="abstract" content="Set the contents of a Record object by using the setField() method in your Java program." />
<meta name="description" content="Set the contents of a Record object by using the setField() method in your Java program." />
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="dtadset" />
<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>Setting the contents of a field</title>
</head>
<body id="dtadset"><a name="dtadset"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Setting the contents of a field</h1>
<div><p>Set the contents of a Record object by using the setField() method
in your Java™ program.</p>
<div class="section"><p> <a href="javadoc/com/ibm/as400/access/Record.html#SETFIELD(INT, JAVA.LANG.OBJECT)">SetField()</a> method </p>
<p>The Java program must specify the appropriate Java object
for the field being set. The following table shows the appropriate Java object
for each possible field type.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="border" border="1" rules="all"><thead align="left"><tr class="tablemainheaderbar"><th valign="top" width="38.57142857142858%" id="d0e39">Field Type (DDS)</th>
<th valign="top" width="45.714285714285715%" id="d0e41">Field Type (FieldDescription)</th>
<th valign="top" width="15.714285714285714%" id="d0e43">Java Object</th>
</tr>
</thead>
<tbody><tr><td valign="top" width="38.57142857142858%" headers="d0e39 ">BINARY (B), length &lt;= 4</td>
<td valign="top" width="45.714285714285715%" headers="d0e41 ">BinaryFieldDescription</td>
<td valign="top" width="15.714285714285714%" headers="d0e43 ">Short</td>
</tr>
<tr><td valign="top" width="38.57142857142858%" headers="d0e39 ">BINARY (B), length &gt;= 5</td>
<td valign="top" width="45.714285714285715%" headers="d0e41 ">BinaryFieldDescription</td>
<td valign="top" width="15.714285714285714%" headers="d0e43 ">Integer</td>
</tr>
<tr><td valign="top" width="38.57142857142858%" headers="d0e39 ">CHARACTER (A)</td>
<td valign="top" width="45.714285714285715%" headers="d0e41 ">CharacterFieldDescription</td>
<td valign="top" width="15.714285714285714%" headers="d0e43 ">String</td>
</tr>
<tr><td valign="top" width="38.57142857142858%" headers="d0e39 ">DBCS Either (E)</td>
<td valign="top" width="45.714285714285715%" headers="d0e41 ">DBCSEitherFieldDescription</td>
<td valign="top" width="15.714285714285714%" headers="d0e43 ">String</td>
</tr>
<tr><td valign="top" width="38.57142857142858%" headers="d0e39 ">DBCS Graphic (G)</td>
<td valign="top" width="45.714285714285715%" headers="d0e41 ">DBCSGraphicFieldDescription</td>
<td valign="top" width="15.714285714285714%" headers="d0e43 ">String</td>
</tr>
<tr><td valign="top" width="38.57142857142858%" headers="d0e39 ">DBCS Only (J)</td>
<td valign="top" width="45.714285714285715%" headers="d0e41 ">DBCSOnlyFieldDescription</td>
<td valign="top" width="15.714285714285714%" headers="d0e43 ">String</td>
</tr>
<tr><td valign="top" width="38.57142857142858%" headers="d0e39 ">DBCS Open (O)</td>
<td valign="top" width="45.714285714285715%" headers="d0e41 ">DBCSOpenFieldDescription</td>
<td valign="top" width="15.714285714285714%" headers="d0e43 ">String</td>
</tr>
<tr><td valign="top" width="38.57142857142858%" headers="d0e39 ">DATE (L)</td>
<td valign="top" width="45.714285714285715%" headers="d0e41 ">DateFieldDescription</td>
<td valign="top" width="15.714285714285714%" headers="d0e43 ">String</td>
</tr>
<tr><td valign="top" width="38.57142857142858%" headers="d0e39 ">FLOAT (F), single precision</td>
<td valign="top" width="45.714285714285715%" headers="d0e41 ">FloatFieldDescription</td>
<td valign="top" width="15.714285714285714%" headers="d0e43 ">Float</td>
</tr>
<tr><td valign="top" width="38.57142857142858%" headers="d0e39 ">FLOAT (F), double precision</td>
<td valign="top" width="45.714285714285715%" headers="d0e41 ">FloatFieldDescription</td>
<td valign="top" width="15.714285714285714%" headers="d0e43 ">Double</td>
</tr>
<tr><td valign="top" width="38.57142857142858%" headers="d0e39 ">HEXADECIMAL (H)</td>
<td valign="top" width="45.714285714285715%" headers="d0e41 ">HexFieldDescription</td>
<td valign="top" width="15.714285714285714%" headers="d0e43 ">byte[]</td>
</tr>
<tr><td valign="top" width="38.57142857142858%" headers="d0e39 ">PACKED DECIMAL (P)</td>
<td valign="top" width="45.714285714285715%" headers="d0e41 ">PackedDecimalFieldDescription</td>
<td valign="top" width="15.714285714285714%" headers="d0e43 ">BigDecimal</td>
</tr>
<tr><td valign="top" width="38.57142857142858%" headers="d0e39 ">TIME (T)</td>
<td valign="top" width="45.714285714285715%" headers="d0e41 ">TimeDecimalFieldDescription</td>
<td valign="top" width="15.714285714285714%" headers="d0e43 ">String</td>
</tr>
<tr><td valign="top" width="38.57142857142858%" headers="d0e39 ">TIMESTAMP (Z)</td>
<td valign="top" width="45.714285714285715%" headers="d0e41 ">TimestampDecimalFieldDescription</td>
<td valign="top" width="15.714285714285714%" headers="d0e43 ">String</td>
</tr>
<tr><td valign="top" width="38.57142857142858%" headers="d0e39 ">ZONED DECIMAL (P)</td>
<td valign="top" width="45.714285714285715%" headers="d0e41 ">ZonedDecimalFieldDescription</td>
<td valign="top" width="15.714285714285714%" headers="d0e43 ">BigDecimal</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</body>
</html>