1<!--$Id: seq_set_flags.so,v 1.7 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_flags</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_flags</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_flags(DB_SEQUENCE *seq, u_int32_t flags);
26<p>
27int
28DB_SEQUENCE-&gt;get_flags(DB_SEQUENCE *seq, u_int32_t *flagsp);
29</pre></b>
30<hr size=1 noshade>
31<b>Description: DB_SEQUENCE-&gt;set_flags</b>
32<p>Configure a sequence.  The flags are only effective when creating a
33sequence.  Calling DB_SEQUENCE-&gt;set_flags is additive; there is no way
34to clear flags.</p>
35<p>The DB_SEQUENCE-&gt;set_flags 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_flags method
38returns a non-zero error value on failure
39and 0 on success.
40</p>
41<b>Parameters</b> <br>
42 <b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to 0 or by bitwise inclusively <b>OR</b>'ing together one
43or more of the following values:
44<br>
45<b><a name="DB_SEQ_DEC">DB_SEQ_DEC</a></b><ul compact><li>Specify that the sequence should be decremented.</ul>
46<br>
47<br>
48<b><a name="DB_SEQ_INC">DB_SEQ_INC</a></b><ul compact><li>Specify that the sequence should be incremented.  This is the default.</ul>
49<br>
50<br>
51<b><a name="DB_SEQ_WRAP">DB_SEQ_WRAP</a></b><ul compact><li>Specify that the sequence should wrap around when it is incremented
52(decremented) past the specified maximum (minimum) value.</ul>
53<br></ul>
54<br>
55<br><b>Errors</b>
56<p>The DB_SEQUENCE-&gt;set_flags method
57may fail and return one of the following non-zero errors:</p>
58<br>
59<b>EINVAL</b><ul compact><li>An
60invalid flag value or parameter was specified.</ul>
61<br>
62<hr size=1 noshade>
63<b>Description: DB_SEQUENCE-&gt;get_flags</b>
64<p>The DB_SEQUENCE-&gt;get_flags method returns the current flags.</p>
65<p>The DB_SEQUENCE-&gt;get_flags method may be called at any time during the life of the
66application.</p>
67<p>The DB_SEQUENCE-&gt;get_flags method
68returns a non-zero error value on failure
69and 0 on success.
70</p>
71<b>Parameters</b> <br>
72 <b>flagsp</b><ul compact><li>The DB_SEQUENCE-&gt;get_flags method returns  the
73current flags in <b>flagsp</b>.</ul>
74<br>
75<hr size=1 noshade>
76<br><b>Class</b>
77<a href="../api_c/seq_class.html">DB_SEQUENCE</a>
78<br><b>See Also</b>
79<a href="../api_c/seq_list.html">Sequences and Related Methods</a>
80</tt>
81<table width="100%"><tr><td><br></td><td align=right>
82<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>
83</td></tr></table>
84<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
85</body>
86</html>
87