1<!--$Id: seq_set_range.so,v 1.6 2004/09/07 15:37:41 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_SEQUENCE-&gt;set_range</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_SEQUENCE-&gt;set_range</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 &lt;db.h&gt;
23<p>
24int
25DB_SEQUENCE-&gt;set_range(DB_SEQUENCE *seq, db_seq_t min, db_seq_t max);
26<p>
27int
28DB_SEQUENCE-&gt;get_range(DB_SEQUENCE *seq, db_seq_t *minp, db_seq_t *maxp);
29</pre></b>
30<hr size=1 noshade>
31<b>Description: DB_SEQUENCE-&gt;set_range</b>
32<p>Configure a sequence range.  This call is only effective when the
33sequence is being created.  The range is limited to a signed 64 bit
34integer.</p>
35<p>The DB_SEQUENCE-&gt;set_range method may not be called after the
36<a href="../api_c/seq_open.html">DB_SEQUENCE-&gt;open</a> method is called.</p>
37<p>The DB_SEQUENCE-&gt;set_range method
38returns a non-zero error value on failure
39and 0 on success.
40</p>
41<b>Parameters</b> <br>
42 <b>min</b><ul compact><li>Specifies the minimum value for the sequence.</ul>
43 <b>max</b><ul compact><li>Specifies the maximum value for the sequence.</ul>
44<br>
45<br><b>Errors</b>
46<p>The DB_SEQUENCE-&gt;set_range method
47may fail and return one of the following non-zero errors:</p>
48<br>
49<b>EINVAL</b><ul compact><li>An
50invalid flag value or parameter was specified.</ul>
51<br>
52<hr size=1 noshade>
53<b>Description: DB_SEQUENCE-&gt;get_range</b>
54<p>The DB_SEQUENCE-&gt;get_range method returns the range of values in the sequence.</p>
55<p>The DB_SEQUENCE-&gt;get_range method may be called at any time during the life of the
56application.</p>
57<p>The DB_SEQUENCE-&gt;get_range method
58returns a non-zero error value on failure
59and 0 on success.
60</p>
61<b>Parameters</b> <br>
62 <b>minp</b><ul compact><li>The DB_SEQUENCE-&gt;get_range method returns the minimum value in <b>minp</b>.</ul>
63 <b>maxp</b><ul compact><li>The DB_SEQUENCE-&gt;get_range method returns the maximum value in <b>maxp</b>.</ul>
64<br>
65<hr size=1 noshade>
66<br><b>Class</b>
67<a href="../api_c/seq_class.html">DB_SEQUENCE</a>
68<br><b>See Also</b>
69<a href="../api_c/seq_list.html">Sequences and Related Methods</a>
70</tt>
71<table width="100%"><tr><td><br></td><td align=right>
72<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>
73</td></tr></table>
74<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
75</body>
76</html>
77