• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src/router/db-4.8.30/docs/api_reference/CXX/
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_errpfx()</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_error_stream.html" title="Db::set_error_stream()" />
12    <link rel="next" href="dbset_feedback.html" title="Db::set_feedback()" />
13  </head>
14  <body>
15    <div class="navheader">
16      <table width="100%" summary="Navigation header">
17        <tr>
18          <th colspan="3" align="center">Db::set_errpfx()</th>
19        </tr>
20        <tr>
21          <td width="20%" align="left"><a accesskey="p" href="dbset_error_stream.html">Prev</a> </td>
22          <th width="60%" align="center">Chapter 2. 
23                The Db Handle
24        </th>
25          <td width="20%" align="right"> <a accesskey="n" href="dbset_feedback.html">Next</a></td>
26        </tr>
27      </table>
28      <hr />
29    </div>
30    <div class="sect1" lang="en" xml:lang="en">
31      <div class="titlepage">
32        <div>
33          <div>
34            <h2 class="title" style="clear: both"><a id="dbset_errpfx"></a>Db::set_errpfx()</h2>
35          </div>
36        </div>
37      </div>
38      <pre class="programlisting">#include &lt;db_cxx.h&gt;
39
40void Db::set_errpfx(const char *errpfx); </pre>
41      <p>
42         Set the prefix string that appears before error messages issued by
43         Berkeley DB.
44    </p>
45      <p>
46         The <code class="methodname">Db::set_errpfx()</code> and 
47         <a class="xref" href="envset_errpfx.html" title="DbEnv::set_errpfx()">DbEnv::set_errpfx()</a> 
48         methods do not copy the memory to which the <span class="bold"><strong>errpfx</strong></span> parameter refers; rather, they maintain
49         a reference to it.  Although this allows applications to modify the
50         error message prefix at any time (without repeatedly calling the
51         interfaces), it means the memory must be maintained until the handle
52         is closed.
53    </p>
54      <p>
55         For <a class="link" href="db.html" title="Chapter 2.  The Db Handle">Db</a>  handles opened
56         inside of Berkeley DB environments, calling the <code class="methodname">Db::set_errpfx()</code>
57         method affects the entire environment and is equivalent to calling the
58         <a class="xref" href="envset_errpfx.html" title="DbEnv::set_errpfx()">DbEnv::set_errpfx()</a> 
59         method.
60    </p>
61      <p>
62         The <code class="methodname">Db::set_errpfx()</code> method configures operations performed using the
63         specified <a class="link" href="db.html" title="Chapter 2.  The Db Handle">Db</a>  handle, not
64         all operations performed on the underlying database.
65    </p>
66      <p>
67         The <code class="methodname">Db::set_errpfx()</code> method may be called at any time during the life
68         of the application.
69    </p>
70      <div class="sect2" lang="en" xml:lang="en">
71        <div class="titlepage">
72          <div>
73            <div>
74              <h3 class="title"><a id="id1646690"></a>Parameters</h3>
75            </div>
76          </div>
77        </div>
78        <div class="sect3" lang="en" xml:lang="en">
79          <div class="titlepage">
80            <div>
81              <div>
82                <h4 class="title"><a id="id1646618"></a>errpfx</h4>
83              </div>
84            </div>
85          </div>
86          <p>
87                          The <span class="bold"><strong>errpfx</strong></span> parameter is the
88                          application-specified error prefix for additional error messages.
89                     </p>
90        </div>
91      </div>
92      <div class="sect2" lang="en" xml:lang="en">
93        <div class="titlepage">
94          <div>
95            <div>
96              <h3 class="title"><a id="id1646883"></a>Class</h3>
97            </div>
98          </div>
99        </div>
100        <p>
101                <a class="link" href="db.html" title="Chapter 2.  The Db Handle">Db</a>  
102            </p>
103      </div>
104      <div class="sect2" lang="en" xml:lang="en">
105        <div class="titlepage">
106          <div>
107            <div>
108              <h3 class="title"><a id="id1646821"></a>See Also</h3>
109            </div>
110          </div>
111        </div>
112        <p>
113                     <a class="xref" href="db.html#dblist" title="Database and Related Methods">Database and Related Methods</a> 
114                </p>
115      </div>
116    </div>
117    <div class="navfooter">
118      <hr />
119      <table width="100%" summary="Navigation footer">
120        <tr>
121          <td width="40%" align="left"><a accesskey="p" href="dbset_error_stream.html">Prev</a> </td>
122          <td width="20%" align="center">
123            <a accesskey="u" href="db.html">Up</a>
124          </td>
125          <td width="40%" align="right"> <a accesskey="n" href="dbset_feedback.html">Next</a></td>
126        </tr>
127        <tr>
128          <td width="40%" align="left" valign="top">Db::set_error_stream() </td>
129          <td width="20%" align="center">
130            <a accesskey="h" href="index.html">Home</a>
131          </td>
132          <td width="40%" align="right" valign="top"> Db::set_feedback()</td>
133        </tr>
134      </table>
135    </div>
136  </body>
137</html>
138