<!--$Id: db_set_errpfx.so,v 10.10 2002/08/18 21:15:55 bostic Exp $--> <!--$Id: env_set_errpfx.so,v 10.21 2002/08/18 21:16:27 bostic Exp $--> <!--Copyright 1997-2002 by Sleepycat Software, Inc.--> <!--All rights reserved.--> <!--See the file LICENSE for redistribution information.--> <html> <head> <title>Berkeley DB: DB->set_errpfx</title> <meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> <meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++"> </head> <body bgcolor=white> <a name="2"><!--meow--></a> <table width="100%"><tr valign=top> <td> <h1>DB->set_errpfx</h1> </td> <td align=right> <a href="../../db4-devel-4.1.25/api_c/c_index.html"><img src="../../db4-4.1.25/images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../../db4-4.1.25/images/ref.gif" alt="Ref"></a> </td></tr></table> <hr size=1 noshade> <tt> <h3><pre> #include <db.h> <p> void DB->set_errpfx(DB *db, const char *errpfx); </pre></h3> <h1>Description</h1> <p>Set the prefix string that appears before error messages issued by Berkeley DB. <p>The DB->set_errpfx and <a href="../../db4-devel-4.1.25/api_c/env_set_errpfx.html">DB_ENV->set_errpfx</a> methods do not copy the memory to which the <b>errpfx</b> argument refers; rather, they maintain a reference to it. Although this allows applications to modify the error message prefix at any time (without repeatedly calling the interfaces), it means the memory must be maintained until the handle is closed. <p>For <a href="../../db4-devel-4.1.25/api_c/db_class.html">DB</a> handles opened inside of Berkeley DB environments, calling the DB->set_errpfx method affects the entire environment and is equivalent to calling the <a href="../../db4-devel-4.1.25/api_c/env_set_errpfx.html">DB_ENV->set_errpfx</a> method. <p>The DB->set_errpfx interface may be called at any time during the life of the application. <h1>Class</h1> <a href="../../db4-devel-4.1.25/api_c/db_class.html">DB</a> <h1>See Also</h1> <a href="../../db4-devel-4.1.25/api_c/db_list.html">Databases and Related Methods</a> </tt> <table width="100%"><tr><td><br></td><td align=right> <a href="../../db4-devel-4.1.25/api_c/c_index.html"><img src="../../db4-4.1.25/images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../../db4-4.1.25/images/ref.gif" alt="Ref"></a> </td></tr></table> <p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font> </body> </html>