| 1 |
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| 2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 |
<head> |
| 5 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| 6 |
<title>Db::set_re_delim()</title> |
| 7 |
<link rel="stylesheet" href="apiReference.css" type="text/css" /> |
| 8 |
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> |
| 9 |
<link rel="start" href="index.html" title="Berkeley DB C++ API Reference" /> |
| 10 |
<link rel="up" href="db.html" title="Chapter 2. The Db Handle" /> |
| 11 |
<link rel="prev" href="dbset_q_extentsize.html" title="Db::set_q_extentsize()" /> |
| 12 |
<link rel="next" href="dbset_re_len.html" title="Db::set_re_len()" /> |
| 13 |
</head> |
| 14 |
<body> |
| 15 |
<div xmlns="" class="navheader"> |
| 16 |
<div class="libver"> |
| 17 |
<p>Library Version 11.2.5.3</p> |
| 18 |
</div> |
| 19 |
<table width="100%" summary="Navigation header"> |
| 20 |
<tr> |
| 21 |
<th colspan="3" align="center">Db::set_re_delim()</th> |
| 22 |
</tr> |
| 23 |
<tr> |
| 24 |
<td width="20%" align="left"><a accesskey="p" href="dbset_q_extentsize.html">Prev</a> </td> |
| 25 |
<th width="60%" align="center">Chapter 2. |
| 26 |
The Db Handle |
| 27 |
</th> |
| 28 |
<td width="20%" align="right"> <a accesskey="n" href="dbset_re_len.html">Next</a></td> |
| 29 |
</tr> |
| 30 |
</table> |
| 31 |
<hr /> |
| 32 |
</div> |
| 33 |
<div class="sect1" lang="en" xml:lang="en"> |
| 34 |
<div class="titlepage"> |
| 35 |
<div> |
| 36 |
<div> |
| 37 |
<h2 class="title" style="clear: both"><a id="dbset_re_delim"></a>Db::set_re_delim()</h2> |
| 38 |
</div> |
| 39 |
</div> |
| 40 |
</div> |
| 41 |
<pre class="programlisting">#include <db_cxx.h> |
| 42 |
|
| 43 |
int |
| 44 |
Db::set_re_delim(int re_delim); </pre> |
| 45 |
<p> |
| 46 |
Set the delimiting byte used to mark the end of a record in the |
| 47 |
backing source file for the Recno access method. |
| 48 |
</p> |
| 49 |
<p> |
| 50 |
This byte is used for variable length records if the |
| 51 |
<span class="bold"><strong>re_source</strong></span> file is specified using the |
| 52 |
<a class="xref" href="dbset_re_source.html" title="Db::set_re_source()">Db::set_re_source()</a> |
| 53 |
method. If the <span class="bold"><strong>re_source</strong></span> file is |
| 54 |
specified and no delimiting byte was specified, <newline> |
| 55 |
characters (that is, ASCII 0x0a) are interpreted as end-of-record markers. |
| 56 |
</p> |
| 57 |
<p> |
| 58 |
The <code class="methodname">Db::set_re_delim()</code> method configures a database, not only |
| 59 |
operations performed using the specified |
| 60 |
<a class="link" href="db.html" title="Chapter 2. The Db Handle">Db</a> handle. |
| 61 |
</p> |
| 62 |
<p> |
| 63 |
The <code class="methodname">Db::set_re_delim()</code> method may not be called after the |
| 64 |
<a class="xref" href="dbopen.html" title="Db::open()">Db::open()</a> method is called. If |
| 65 |
the database already exists when |
| 66 |
<a class="xref" href="dbopen.html" title="Db::open()">Db::open()</a> is called, the |
| 67 |
information specified to <code class="methodname">Db::set_re_delim()</code> will be ignored. |
| 68 |
</p> |
| 69 |
<p> |
| 70 |
The <code class="methodname">Db::set_re_delim()</code> <span> |
| 71 |
|
| 72 |
<span> |
| 73 |
method either returns a non-zero error value or throws an |
| 74 |
exception that encapsulates a non-zero error value on |
| 75 |
failure, and returns 0 on success. |
| 76 |
</span> |
| 77 |
</span> |
| 78 |
</p> |
| 79 |
<div class="sect2" lang="en" xml:lang="en"> |
| 80 |
<div class="titlepage"> |
| 81 |
<div> |
| 82 |
<div> |
| 83 |
<h3 class="title"><a id="idp5808696"></a>Parameters</h3> |
| 84 |
</div> |
| 85 |
</div> |
| 86 |
</div> |
| 87 |
<div class="sect3" lang="en" xml:lang="en"> |
| 88 |
<div class="titlepage"> |
| 89 |
<div> |
| 90 |
<div> |
| 91 |
<h4 class="title"><a id="idp5809296"></a>re_delim</h4> |
| 92 |
</div> |
| 93 |
</div> |
| 94 |
</div> |
| 95 |
<p> |
| 96 |
The <span class="bold"><strong>re_delim</strong></span> parameter is the |
| 97 |
delimiting byte used to mark the end of a record. |
| 98 |
</p> |
| 99 |
</div> |
| 100 |
</div> |
| 101 |
<div class="sect2" lang="en" xml:lang="en"> |
| 102 |
<div class="titlepage"> |
| 103 |
<div> |
| 104 |
<div> |
| 105 |
<h3 class="title"><a id="idp5736288"></a>Errors</h3> |
| 106 |
</div> |
| 107 |
</div> |
| 108 |
</div> |
| 109 |
<p> |
| 110 |
The <code class="methodname">Db::set_re_delim()</code> <span> |
| 111 |
|
| 112 |
<span> |
| 113 |
method may fail and throw a <a class="link" href="dbexception.html" title="Chapter 6. The DbException Class">DbException</a> |
| 114 |
exception, encapsulating one of the following non-zero errors, or return one |
| 115 |
of the following non-zero errors: |
| 116 |
</span> |
| 117 |
</span> |
| 118 |
</p> |
| 119 |
<div class="sect3" lang="en" xml:lang="en"> |
| 120 |
<div class="titlepage"> |
| 121 |
<div> |
| 122 |
<div> |
| 123 |
<h4 class="title"><a id="idp5816648"></a>EINVAL</h4> |
| 124 |
</div> |
| 125 |
</div> |
| 126 |
</div> |
| 127 |
<p> |
| 128 |
If the method was called after <a class="xref" href="dbopen.html" title="Db::open()">Db::open()</a> |
| 129 |
was called; or if an invalid flag value or parameter was specified. |
| 130 |
</p> |
| 131 |
</div> |
| 132 |
</div> |
| 133 |
<div class="sect2" lang="en" xml:lang="en"> |
| 134 |
<div class="titlepage"> |
| 135 |
<div> |
| 136 |
<div> |
| 137 |
<h3 class="title"><a id="idp5817976"></a>Class</h3> |
| 138 |
</div> |
| 139 |
</div> |
| 140 |
</div> |
| 141 |
<p> |
| 142 |
<a class="link" href="db.html" title="Chapter 2. The Db Handle">Db</a> |
| 143 |
</p> |
| 144 |
</div> |
| 145 |
<div class="sect2" lang="en" xml:lang="en"> |
| 146 |
<div class="titlepage"> |
| 147 |
<div> |
| 148 |
<div> |
| 149 |
<h3 class="title"><a id="idp5803240"></a>See Also</h3> |
| 150 |
</div> |
| 151 |
</div> |
| 152 |
</div> |
| 153 |
<p> |
| 154 |
<a class="xref" href="db.html#dblist" title="Database and Related Methods">Database and Related Methods</a> |
| 155 |
</p> |
| 156 |
</div> |
| 157 |
</div> |
| 158 |
<div class="navfooter"> |
| 159 |
<hr /> |
| 160 |
<table width="100%" summary="Navigation footer"> |
| 161 |
<tr> |
| 162 |
<td width="40%" align="left"><a accesskey="p" href="dbset_q_extentsize.html">Prev</a> </td> |
| 163 |
<td width="20%" align="center"> |
| 164 |
<a accesskey="u" href="db.html">Up</a> |
| 165 |
</td> |
| 166 |
<td width="40%" align="right"> <a accesskey="n" href="dbset_re_len.html">Next</a></td> |
| 167 |
</tr> |
| 168 |
<tr> |
| 169 |
<td width="40%" align="left" valign="top">Db::set_q_extentsize() </td> |
| 170 |
<td width="20%" align="center"> |
| 171 |
<a accesskey="h" href="index.html">Home</a> |
| 172 |
</td> |
| 173 |
<td width="40%" align="right" valign="top"> Db::set_re_len()</td> |
| 174 |
</tr> |
| 175 |
</table> |
| 176 |
</div> |
| 177 |
</body> |
| 178 |
</html> |