1<!--$Id: env_set_errpfx.so,v 10.34 2006/02/10 22:54:59 bostic Exp $-->
2<!--Copyright (c) 1997,2008 Oracle.  All rights reserved.-->
3<!--See the file LICENSE for redistribution information.-->
4<html>
5<head>
6<title>Berkeley DB: DbEnv::set_errpfx</title>
7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
9</head>
10<body bgcolor=white>
11<table width="100%"><tr valign=top>
12<td>
13<b>DbEnv::set_errpfx</b>
14</td>
15<td align=right>
16<a href="../api_cxx/api_core.html"><img src="../images/api.gif" alt="API"></a>
17<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
18</tr></table>
19<hr size=1 noshade>
20<tt>
21<b><pre>
22#include &lt;db_cxx.h&gt;
23<p>
24void
25DbEnv::set_errpfx(const char *errpfx);
26<p>
27void
28DbEnv::get_errpfx(const char **errpfxp);
29</pre></b>
30<hr size=1 noshade>
31<b>Description: DbEnv::set_errpfx</b>
32<p>Set the prefix string that appears before error messages issued by Berkeley DB.</p>
33<p>The <a href="../api_cxx/db_set_errpfx.html">Db::set_errpfx</a> and DbEnv::set_errpfx methods do not copy
34the memory to which the <b>errpfx</b> parameter refers; rather, they
35maintain a reference to it.  Although this allows applications to modify
36the error message prefix at any time (without repeatedly calling the
37interfaces), it means the memory must be maintained until the handle is
38closed.</p>
39<p>The DbEnv::set_errpfx method configures operations performed using the specified
40<a href="../api_cxx/env_class.html">DbEnv</a> handle, not all operations performed on the underlying
41database environment.</p>
42<p>The DbEnv::set_errpfx method may be called at any time during the life of the
43application.</p>
44<b>Parameters</b> <br>
45 <b>errpfx</b><ul compact><li>The <b>errpfx</b> parameter is the application-specified error prefix
46for additional error messages.</ul>
47<br>
48<hr size=1 noshade>
49<b>Description: DbEnv::get_errpfx</b>
50<p>The DbEnv::get_errpfx method returns the error prefix.</p>
51<p>The DbEnv::get_errpfx method may be called at any time during the life of the
52application.</p>
53<p>The DbEnv::get_errpfx method
54either returns a non-zero error value
55or throws an exception that encapsulates a non-zero error value on
56failure, and returns 0 on success.
57</p>
58<b>Parameters</b> <br>
59 <b>errpfxp</b><ul compact><li>The DbEnv::get_errpfx method returns a reference to the
60error prefix in <b>errpfxp</b>.</ul>
61<br>
62<hr size=1 noshade>
63<br><b>Class</b>
64<a href="../api_cxx/env_class.html">DbEnv</a>
65<br><b>See Also</b>
66<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
67</tt>
68<table width="100%"><tr><td><br></td><td align=right>
69<a href="../api_cxx/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
70</td></tr></table>
71<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
72</body>
73</html>
74