1<?xml version="1.0" encoding="UTF-8"?>
2
3
4<!--
5 ***********************************************************************
6 *
7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8 *
9 * Copyright 2000, 2010 Oracle and/or its affiliates.
10 *
11 * OpenOffice.org - a multi-platform office productivity suite
12 *
13 * This file is part of OpenOffice.org.
14 *
15 * OpenOffice.org is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License version 3
17 * only, as published by the Free Software Foundation.
18 *
19 * OpenOffice.org is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22 * GNU Lesser General Public License version 3 for more details
23 * (a copy is included in the LICENSE file that accompanied this code).
24 *
25 * You should have received a copy of the GNU Lesser General Public License
26 * version 3 along with OpenOffice.org.  If not, see
27 * <http://www.openoffice.org/license.html>
28 * for a copy of the LGPLv3 License.
29 *
30 ************************************************************************
31 -->
32
33<helpdocument version="1.0">
34<meta>
35<topic id="textsharedexplorerdatabasedabaadvpropgenxml" indexer="include" status="PUBLISH">
36<title id="tit" xml-lang="en-US">Generated Values</title>
37<filename>/text/shared/explorer/database/dabaadvpropgen.xhp</filename>
38</topic>
39<history>
40<created date="2004-07-30T11:20:09">Advanced Properties dialog Generated values tab page</created>
41<lastedited date="2007-01-26T10:19:28">dedr: reviewed</lastedited>
42</history>
43</meta>
44<body>
45<section id="generated">
46<paragraph role="heading" id="par_idN10553" xml-lang="en-US" level="1" l10n="NEW"><link href="text/shared/explorer/database/dabaadvpropgen.xhp">Generated Values</link></paragraph>
47<paragraph role="paragraph" id="par_idN10563" xml-lang="en-US" l10n="NEW">Specifies the options for automatically generated values for new data records.<comment>UFI: all text copied from shared\explorer\database\11020000.xhp</comment></paragraph>
48</section>
49<paragraph role="paragraph" id="par_idN10578" xml-lang="en-US" l10n="NEW"><comment>how to get this: Edit Database AdvancedProp ??? I have no idea</comment></paragraph>
50<paragraph role="paragraph" id="par_id7684560" xml-lang="en-US" l10n="NEW">The availability of the following controls depends on the type of database:</paragraph>
51<paragraph role="heading" id="par_idN1058C" xml-lang="en-US" level="2" l10n="NEW">Retrieve generated values</paragraph>
52<paragraph role="paragraph" id="par_idN10590" xml-lang="en-US" l10n="NEW"><ahelp hid=".">Enables $[officename] support for auto-incremented data fields in the current ODBC or JDBC data source. Select this option if the auto-increment feature in the SDBCX layer of the database is not supported. In general<comment>UFI: this does not mean that something is set by default, but "normally,"</comment>, the auto-increment is selected for the primary key field.</ahelp></paragraph>
53<paragraph role="heading" id="par_idN10593" xml-lang="en-US" level="2" l10n="NEW">Auto-increment statement</paragraph>
54<paragraph role="paragraph" id="par_idN10597" xml-lang="en-US" l10n="NEW"><ahelp hid=".">Enter the SQL command specifier that instructs the data source to auto-increment a specified Integer data field.</ahelp> For example, the following MySQL statement used the AUTO_INCREMENT statement to increase the "id" field each time the statement creates a data field:</paragraph>
55<paragraph role="code" id="par_idN105A0" xml-lang="en-US" l10n="NEW">CREATE TABLE "table1" ("id" INTEGER AUTO_INCREMENT)</paragraph>
56<paragraph role="paragraph" id="par_idN10634" xml-lang="en-US" l10n="CHG">For this example, you must enter AUTO_INCREMENT into the <emph>Auto-increment statement</emph> box.</paragraph>
57<paragraph role="heading" id="par_idN105AA" xml-lang="en-US" level="2" l10n="NEW">Query of generated values</paragraph>
58<paragraph role="paragraph" id="par_idN10645" xml-lang="en-US" l10n="NEW"><ahelp hid=".">Enter an SQL statement that returns the last auto-incremented value for the primary key data field.</ahelp> For example:</paragraph>
59<paragraph role="code" id="par_idN105B1" xml-lang="en-US" l10n="NEW">SELECT LAST_INSERT_D();</paragraph>
60</body>
61</helpdocument>
62