1<!--$Id: db_set_re_pad.so,v 10.37 2004/09/28 15:04:19 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::set_re_pad</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::set_re_pad</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 <db_cxx.h> 23<p> 24int 25Db::set_re_pad(int re_pad); 26<p> 27int 28Db::get_re_pad(int *re_padp); 29</pre></b> 30<hr size=1 noshade> 31<b>Description: Db::set_re_pad</b> 32<p>Set the padding character for short, fixed-length records for the Queue 33and Recno access methods.</p> 34<p>If no pad character is specified, <space> characters (that 35is, ASCII 0x20) are used for padding.</p> 36<p>The Db::set_re_pad method configures a database, not only operations performed 37using the specified <a href="/api_cxx/db_class.html">Db</a> handle.</p> 38<p>The Db::set_re_pad method may not be called after the <a href="/api_cxx/db_open.html">Db::open</a> method is called. 39If the database already exists when 40<a href="/api_cxx/db_open.html">Db::open</a> is called, the information specified to Db::set_re_pad will 41be ignored. 42</p> 43<p>The Db::set_re_pad method 44either returns a non-zero error value 45or throws an exception that encapsulates a non-zero error value on 46failure, and returns 0 on success. 47</p> 48<b>Parameters</b> <br> 49 <b>re_pad</b><ul compact><li>The <b>re_pad</b> parameter is the pad character for fixed-length 50records for the Queue and Recno access methods.</ul> 51<br> 52<br><b>Errors</b> 53<p>The Db::set_re_pad method 54may fail and throw 55<a href="/api_cxx/except_class.html">DbException</a>, 56encapsulating one of the following non-zero errors, or return one of 57the following non-zero errors:</p> 58<br> 59<b>EINVAL</b><ul compact><li>If the method was called after <a href="/api_cxx/db_open.html">Db::open</a> was called; or if an 60invalid flag value or parameter was specified.</ul> 61<br> 62<hr size=1 noshade> 63<b>Description: Db::get_re_pad</b> 64<p>The Db::get_re_pad method returns the pad character.</p> 65<p>The Db::get_re_pad method may be called at any time during the life of the 66application.</p> 67<p>The Db::get_re_pad method 68either returns a non-zero error value 69or throws an exception that encapsulates a non-zero error value on 70failure, and returns 0 on success. 71</p> 72<b>Parameters</b> <br> 73 <b>re_padp</b><ul compact><li>The Db::get_re_pad method returns the 74pad character in <b>re_padp</b>.</ul> 75<br> 76<hr size=1 noshade> 77<br><b>Class</b> 78<a href="/api_cxx/db_class.html">Db</a> 79<br><b>See Also</b> 80<a href="/api_cxx/db_list.html">Databases and Related Methods</a> 81</tt> 82<table width="100%"><tr><td><br></td><td align=right> 83<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> 84</td></tr></table> 85<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font> 86</body> 87</html> 88