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: DB_ENV->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>DB_ENV->set_errpfx</b> 14</td> 15<td align=right> 16<a href="/api_c/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 <db.h> 23<p> 24void 25DB_ENV->set_errpfx(DB_ENV *dbenv, const char *errpfx); 26<p> 27void 28DB_ENV->get_errpfx(DB_ENV *dbenv, const char **errpfxp); 29</pre></b> 30<hr size=1 noshade> 31<b>Description: DB_ENV->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_c/db_set_errpfx.html">DB->set_errpfx</a> and DB_ENV->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 DB_ENV->set_errpfx method configures operations performed using the specified 40<a href="/api_c/env_class.html">DB_ENV</a> handle, not all operations performed on the underlying 41database environment.</p> 42<p>The DB_ENV->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: DB_ENV->get_errpfx</b> 50<p>The DB_ENV->get_errpfx method returns the error prefix.</p> 51<p>The DB_ENV->get_errpfx method may be called at any time during the life of the 52application.</p> 53<p>The DB_ENV->get_errpfx method 54returns a non-zero error value on failure 55and 0 on success. 56</p> 57<b>Parameters</b> <br> 58 <b>errpfxp</b><ul compact><li>The DB_ENV->get_errpfx method returns a reference to the 59error prefix in <b>errpfxp</b>.</ul> 60<br> 61<hr size=1 noshade> 62<br><b>Class</b> 63<a href="/api_c/env_class.html">DB_ENV</a> 64<br><b>See Also</b> 65<a href="/api_c/env_list.html">Database Environments and Related Methods</a> 66</tt> 67<table width="100%"><tr><td><br></td><td align=right> 68<a href="/api_c/api_core.html"><img src="/images/api.gif" alt="API"></a><a href="/ref/toc.html"><img src="/images/ref.gif" alt="Ref"></a> 69</td></tr></table> 70<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font> 71</body> 72</html> 73