1<?xml version="1.0" encoding="UTF-8" standalone="no"?> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3<html xmlns="http://www.w3.org/1999/xhtml"> 4 <head> 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 6 <title>DB_SEQUENCE->initial_value()</title> 7 <link rel="stylesheet" href="apiReference.css" type="text/css" /> 8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> 9 <link rel="start" href="index.html" title="Berkeley DB C API Reference" /> 10 <link rel="up" href="seq.html" title="Chapter 11. The DB_SEQUENCE Handle" /> 11 <link rel="prev" href="seqget_range.html" title="DB_SEQUENCE->get_range()" /> 12 <link rel="next" href="seqopen.html" title="DB_SEQUENCE->open()" /> 13 </head> 14 <body> 15 <div class="navheader"> 16 <table width="100%" summary="Navigation header"> 17 <tr> 18 <th colspan="3" align="center">DB_SEQUENCE->initial_value()</th> 19 </tr> 20 <tr> 21 <td width="20%" align="left"><a accesskey="p" href="seqget_range.html">Prev</a> </td> 22 <th width="60%" align="center">Chapter 11. 23 The DB_SEQUENCE Handle 24 </th> 25 <td width="20%" align="right"> <a accesskey="n" href="seqopen.html">Next</a></td> 26 </tr> 27 </table> 28 <hr /> 29 </div> 30 <div class="sect1" lang="en" xml:lang="en"> 31 <div class="titlepage"> 32 <div> 33 <div> 34 <h2 class="title" style="clear: both"><a id="seqinitial_value"></a>DB_SEQUENCE->initial_value()</h2> 35 </div> 36 </div> 37 </div> 38 <pre class="programlisting">#include <db.h> 39 40int 41DB_SEQUENCE->initial_value(DB_SEQUENCE *seq, db_seq_t value); </pre> 42 <p> 43 Set the initial value for a sequence. This call is only effective 44 when the sequence is being created. 45 </p> 46 <p> 47 The <code class="methodname">DB_SEQUENCE->initial_value()</code> method may not be called after the 48 <a class="xref" href="seqopen.html" title="DB_SEQUENCE->open()">DB_SEQUENCE->open()</a> 49 method is called. 50 </p> 51 <p> 52 The <code class="methodname">DB_SEQUENCE->initial_value()</code> <span> 53 <span> 54 method returns a non-zero error value on failure and 0 on success. 55 </span> 56 57 </span> 58 </p> 59 <div class="sect2" lang="en" xml:lang="en"> 60 <div class="titlepage"> 61 <div> 62 <div> 63 <h3 class="title"><a id="id1705613"></a>Parameters</h3> 64 </div> 65 </div> 66 </div> 67 <div class="sect3" lang="en" xml:lang="en"> 68 <div class="titlepage"> 69 <div> 70 <div> 71 <h4 class="title"><a id="id1705585"></a>value</h4> 72 </div> 73 </div> 74 </div> 75 <p> 76 The initial value to set. 77 </p> 78 </div> 79 </div> 80 <div class="sect2" lang="en" xml:lang="en"> 81 <div class="titlepage"> 82 <div> 83 <div> 84 <h3 class="title"><a id="id1705614"></a>Errors</h3> 85 </div> 86 </div> 87 </div> 88 <p> 89 The <code class="methodname">DB_SEQUENCE->initial_value()</code> <span> 90 <span> 91 method may fail and return one of the following non-zero errors: 92 </span> 93 94 </span> 95 </p> 96 <div class="sect3" lang="en" xml:lang="en"> 97 <div class="titlepage"> 98 <div> 99 <div> 100 <h4 class="title"><a id="id1705765"></a>EINVAL</h4> 101 </div> 102 </div> 103 </div> 104 <p> 105 An invalid flag value or parameter was specified. 106 </p> 107 </div> 108 </div> 109 <div class="sect2" lang="en" xml:lang="en"> 110 <div class="titlepage"> 111 <div> 112 <div> 113 <h3 class="title"><a id="id1705510"></a>Class</h3> 114 </div> 115 </div> 116 </div> 117 <p> 118 <a class="link" href="seq.html" title="Chapter 11. The DB_SEQUENCE Handle">DB_SEQUENCE</a> 119 </p> 120 </div> 121 <div class="sect2" lang="en" xml:lang="en"> 122 <div class="titlepage"> 123 <div> 124 <div> 125 <h3 class="title"><a id="id1705766"></a>See Also</h3> 126 </div> 127 </div> 128 </div> 129 <p> 130 <a class="xref" href="seq.html#seqlist" title="Sequences and Related Methods">Sequences and Related Methods</a> 131 </p> 132 </div> 133 </div> 134 <div class="navfooter"> 135 <hr /> 136 <table width="100%" summary="Navigation footer"> 137 <tr> 138 <td width="40%" align="left"><a accesskey="p" href="seqget_range.html">Prev</a> </td> 139 <td width="20%" align="center"> 140 <a accesskey="u" href="seq.html">Up</a> 141 </td> 142 <td width="40%" align="right"> <a accesskey="n" href="seqopen.html">Next</a></td> 143 </tr> 144 <tr> 145 <td width="40%" align="left" valign="top">DB_SEQUENCE->get_range() </td> 146 <td width="20%" align="center"> 147 <a accesskey="h" href="index.html">Home</a> 148 </td> 149 <td width="40%" align="right" valign="top"> DB_SEQUENCE->open()</td> 150 </tr> 151 </table> 152 </div> 153 </body> 154</html> 155