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